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.
Related
I should get the Tracking Id from Google Analytics to use it in my project, but none of the support pages can really cover my problem.
First of all i cannot see the Tracking information menu on my dashboard under the Property column - as some setup guide mention it - , I only see the property settings, which from i can navigate to the Firebase console, and the user settings
After this I find another support page to get the Tracking Id from the Firebase console (https://support.google.com/analytics/answer/2587086?hl=en) , but this also confuses me. It says "Under the Data Sharing Settings section, select the settings you want, and click the Get Tracking ID "
In the firebase console settings board I find a Data privacy menu with az Analytics settings submenu, but still no Tracking ID option.
As I know I need this ID to integrate the Analytics, or is there any workaround for this?
I found a workaround
Open the https://analytics.google.com page, on the top of the page there is a drop-down.
If you click on that dropdown you can see your Analytics accounts in the first column.
The number under your account name is actually your Tracking base-ID.
If you have one project for that account, then your Tracking ID could be UA-123456789-1
One more example
Delete your project (place it to the bin)
Restore it
Check the e-mails you got, there you will find the property which you deleted, and beside the project name there is the Tracking ID
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.
Looking to setup GA tracking for my app (both, Android & iOS), the documentation led me to:
https://developers.google.com/mobile/add
Now after adding GA account added
I need to change the GA account to another existing one.
I don't see any provision either here, or in the dev console.
Do help point me to the right place where this can be changed.
Work around for now:
Remove yourself, from the GA acccount (Of course make sure someone can add you back)
Reload the page, the account selection dropdown is now available
As an aside, within the Google Dev Console,
GDC > My App > Credentials
an iOS and Android key is auto added, on account selection.
I have two Google Analytics accounts A and B, each with their own properties which I am attempting to generate configuration files for (more specifically, google-services.json files) in order to use Google Analytics with my Android app. I'm using the Enable Google Services for your app wizard.
When you reach the Choose and configure services step, it should allow you to choose both a Google Analytics account and an Analytics Property from their associated selection boxes every time you run this wizard. The problem is that the selection box for choosing a Google Analytics Account only appears on the first run of this wizard, and afterwards becomes a pre-filled field that cannot be modified.
This means that if I generate a configuration file for a Property using Account A, I cannot generate another configuration file for a Property using Account B since the wizard pre-fills a non-modifiable text box with Account A, and only Account A's Properties appear in the next selection box.
How can I generate a google-services.json configuration file for a Property under a Google Analytics Account I cannot switch to?
I have admin access to both of these accounts, so this is not an issue.
The configuration file is necessary for Google Analytics to work once the app is released to the public (as described here).
Similar unsolved questions have been asked here for Android and here for iOS (both platforms use the same wizard to enable the Google Analytics service).
Managed to figure out a very simple workaround to solve my own question: remove yourself from the account you're stuck on, so the wizard is then forced to let you choose another account.
To achieve this:
Log into Google Analytics and choose the Admin tab.
In the ACCOUNT column, from the drop-down box, choose the account you were bound to (in the Enable Google Services wizard).
In the same column, choose User management.
Click the Remove myself from this account button.
Then go back to the Enable Google Services wizard again and you should now be able to select another account.
I hope this helps others at least until Google fixes the site, as this was a rather annoying problem to solve!
I figure out the solution for this issue is that we can move the account to trash. After we create an config file, restore the account.
Hope this may help
On this page Google staff gave an answer to this bug:
This is currently working as intended even though it may not seem so. There may be an update to fix this but in the meantime you can just copy an existing Configuration file and edit it. The only thing you need to change is the Analytics tracking ID value.
For example, in the configuration JOSN file you'll see an entry like:
"services": {
"analytics_service": {
"status": 2,
"analytics_property": {
"tracking_id": "UA-XXXXX-YY"
}
},
Replace the UA-XXXXX-YY value with the property ID (for the GA
Account) you want to use. You can use the Account Explorer to find the
correct property ID:
https://ga-dev-tools.appspot.com/account-explorer/
Note that Tracking ID and Property ID mean the same thing.
I am new to analytics and stuck at one point i.e Segment.io (customer data hub). I created an Android app integrated with the Segment Android SDK and expected to see segment.io data in Google Analytics. What is the process I have to follow to see the data of Segment in Google Analytics?
The process is:
Install Segment Android SDK into your app (already done, as follows from your post)
Go to Google Analytics (Admin Panel) and create a new property with "Mobile App" type. GA will asign you a new counter id UA-XXXXXX-X
Go to Segment.IO "Integrations" and turn on Google Analytics. Paste Google analytics counter id UA-XXXXXX-X into "MOBILE TRACKING ID" field. Save changes.
Now, if your mobile app is calling screen and track methods of the Segment API SDK correctly (check Segment.IO's Debugger) - all events will be passed to Google Analytics and showed in Behavior-Events, and screens in Behavior-Screens sections.