How to enable google analytics in Firebase project - android

I need to use Google analytics services in my app (android and ios). I created a project in Google API Console and imported it into Firebase for FCM services. But after that, I cannot link the Google project into Google Analytics and get configuration file. When I try to get configuration file and select app name, it jumps to Firebase console.
If I add Android or iOS in the Firebase project, the configuration file I got doesn't have google analytics info.
Anyone know how to solve this. I need to use Google Analytics in my app but not the Firebase analytics.

I also need to support both standalone Google Analytics SDK and Firebase Analytics, and I was finally able to find a solution in this Google Analytics Support answer (Analytics for mobile apps).
Google Analytics without Firebase:
Go to Google Analytics > Admin > Create new Property
Select Website, using your app name as Website Name, and optionally your company website as Website URL.
Back up to the Admin page.
For the Property you just created, in the right-most column (View), there should be an "All Website Data" view. Create a new View.
Select Mobile App, naming the view something appropriate, like "All Mobile Data".
Note: Property Settings will now contain a valid GA Tracking ID you'll need for client set-up.
Google Analytics with Firebase:
Create a Firebase project for your app.
Go to Google Analytics > Admin > Create new Property
Select Mobile App, then use the "Link to Firebase" dropdown to connect to the Firebase project you created in Step 1.
Keep in mind that while there is still a standalone, non-Firebase Google Analytics API to support legacy applications, Google is definitely pushing all new application-development over to Firebase APIs. My opinion is that this solution is mainly good for libraries that need to support new & legacy apps, or during a transitional period.

Refill and Re-enter your application name in App name field manually, so that you will not have to select the routing to the Firebase option and it will not take you to the firebase console.
It's a silly thing by google

TO go to enable or disable the api like map , drive and other of google apis from Firebase project go to this link and will see all api , hope this help.

1. If you don't have GoogleAnalytcs library in your project, get it.
You can use cocoapods: pod 'Google/Analytics'.
2. Get Tracking ID from https://analytics.google.com. If you have not created an analytics account yet, you can do it there:
3. Add this Tracking ID to GoogleService-info.plistwith key TRACKING_ID:
4. Configure the app:
// Configure tracker from GoogleService-Info.plist.
var configureError:NSError?
GGLContext.sharedInstance().configureWithError(&configureError)
5. Example - sending screenView:
func sendScreenView(name: String) {
let tracker:GAITracker = GAI.sharedInstance().defaultTracker as GAITracker
let build = GAIDictionaryBuilder.createScreenView().set(name, forKey: kGAIScreenName).build() as NSDictionary
tracker.send(build as [NSObject : AnyObject])
}
Note: Above procedure is for iOS, Android configurations should be similar.

Related

is there any alternative for APP_ID and API_KEY?

We are developing an SDK for developers which in core depends on Firebase to get tokens, therefore we are using FirebaseOptions to initialize our firebaseInstance
In the new firebase updates they said: we should provide APP_ID and API_KEY.
Is there any alternative for that as SDK developers?
If not, is there a way to get API_KEY from dashboard instead of download the googel-service.json and extract from it manually?
Both API key and App ID can be found in the Firebase console too.
The API key you need is called Web API Key and can be found in the general gettings screen in the Firebase console.
The App ID can be found when you select a specific app from that general setting screen, and is under the label App ID

Getting error while enabling the Google Cloud Build API for my projects?

Before a few days i got mail.
Enable the Cloud Build API for your projects before April 20, 2020, to
ensure Cloud Function is built and deployed correctly.
Access the Cloud Build API link in the Cloud Console.
Select your project from the drop-down menu.
Click Continue to enable the Cloud Build API for the project. A box will appear in the lower-left corner to confirm the API is enabled.
After click i getting following error for some permission
This API cannot be enabled at the moment. You may lack appropriate permissions.
.
So, which type of permission required i need to enable this service ?
The specific permissions that a user needs to enable APIs for a GCP project are:
serviceusage.services.enable
servicemanagement.services.bind
If you are already the owner of your project, you shouldn't have to add the roles/servicemanagement.serviceConsumer role to your account to enable an API.
You also need to enable billing on the project before you can enable new APIs.
The error I was getting
This API cannot be enabled at the moment. You may lack appropriate
permissions.
The issue for me was I have multiple google / gmail accounts and when I changed deploy location I had to logout and then log back in:
firebase logout
and then log back in
firebase login
This was followed by opening browser and then selecting the appropriate google user to deploy application with.

Issue in finding Tracking Id for Google Analytics

I have to integrate Google Analytics in my Android app.
Completed all the code for it But, Having one issue.
The Issue is taking Tracking ID from my google analytics account.
According to the Document :
==> To find the Google Analytics ID (Tracking Id):
Sign in to your Analytics account.
Click Admin.
Select an account from the menu in the ACCOUNT column.
Select a property from the menu in the PROPERTY column.
Under PROPERTY, click Tracking Info > Tracking Code. Your Google Analytics ID is displayed at the top of the page.
But, I can't find Tracking Info Option or any Tracking Code there according to the step number : 5.
From where can I get Tracking Id which look like this one : (UA-41888835-6) ?
NOTE : I can find Property Id there.
While creating property click on advanced option and enable "Create a Universal Analytics property". This will
Then enable "Create a Universal Analytics property"
then lick next and complete the property creation, now you will have two different properties created. Now choose the universal property where you will find the tracking info. GA4 will not have tracking info.
There are 2 ways to get the Tracking ID in Google Analytics:
If you are using web properties, then Tracking ID is in Admin / Property / Tracking Info / Tracking Code, just as you noted in your question.
If you are using App + Web properties, things get a little bit more complicated. For Android and iOS apps Data Streams, there is no tracking ID as to have GA tracking, you need to add Firebase in your app and link your GA account with Firebase.
However if you are using a web Data Stream, you can get the Tracking ID (although it is called Measurement ID) from Admin / Property / Data Stream / Web.
You may read more details on this article https://analyticshelp.io/blog/google-analytics-property-tracking-id/
Click on setting on lower left -> Click on admin -> select "data streams" under property -> Expand the web tab -> scroll down and click on google site tag
This will definitely solve your problem :)
Since creating the video, Google has changed the default version of Google Analytics from Universal analytics to Google Analytics 4. However, you can still create a universal analytics property. To create an Universal analytics property, click on the "Show advanced options" link on the first page of the create property setup wizard, and then select the toggle to "Create a Universal analytics property". This will give you the tracking ID I mention in the video.
Credits goes to Guiding Digital youtube channel https://youtu.be/__PctBcNZ-c
For the Solution,
I have integrated Firebase from my Android Studio and then you can integrate your firebase project in Google Analytics. So the solution is implementing Google Analytics with Firebase.

UTM tracking codes in Firebase

How to make that Firebase understand and track installation of apps (iOS and Android) with UTM tracking links (for example I want to track installs of apps from my site from footer link)? In GA it works perfect.
In Firebase I din't find any documentations on it (in app only Firebase SDK without Google Analytics).
Utm link
You can create dynamic link with UTMs in Firebase console
The info is in Conversion tab in the Firebase dashboard.
What you may want to do is to apply the filter with "first_open" which is the event name.

can not create Android client id

My apologies for asking this question on Stackoverflow, but Google says that this is my only choice. I have a support package from Google in theory, but all attempts to get a PIN yield "Invalid Operation" (a different problem).
I am just trying to use the Google web page instructions to create an Android client Id for secure access to AppEngine Endpoints.
In the following Google instructions, steps 6 and 7 point me to non-existent user choices on the Google Cloud console.
Straight from the web page:
[https://developers.google.com/appengine/docs/java/endpoints/auth#Java_Creating_OAuth_20_client_IDs]
...
Creating an Android client ID
...
Open the Google Cloud Console. [https://cloud.google.com/console]
When your project appears in the projects pulldown menu, select it to make it the active project. [Selected the project from the table of projects]
Click APIs and Auth and select Registered Apps [No such selections exist; tried all links - nothing even close to on topic.]
If your app is not yet registered, select the Register App button. [No such link exists.]
…
I hope Google is listening and can help. My apologies to everyone else. I have no other way to contact Google.
I don't understand what's the issue, as the instruction provided is correct and that's how we generated the client ID for our projects:

Categories

Resources