How to enable the Google Analytics tracking in my app?


A few weeks ago, we talked about how to understand your app analytics. It's a gold mine to figure out the behavior of your users, and to evaluate your app's performance, whatever is your goal.
The GoodBarber internal statistics are a very good starting point, but in some cases, it can be interesting to plug external analytics tools, like Flurry Analytics or Google Analytics. There are great chances that you already use Google Analytics if you have a website, so, if you use it also for your app, you will be very familiar with it too.
Let's see together how to make your app send data to Google Analytics.

1. Login to your Google Analytics account

Go to , login, and select one of your accounts. Then, click on Admin in the navigation bar.

2. Create a new property

You can create this property inside an existing account, but you can't use the same property than the one used on your website. Click on the list of properties, and choose "Create new property".

3. Set up your property

You have now to indicate that the new property will track data from a Mobile app.
Give it a name, a timezone, and an industry category related to your app.

4. Get your Tracking ID

It's written in big, and it's something like this: UA-xxxxxxxx-y
At this time, Google will suggest you to download the Google Analytics SDKs for iOS and Android to add them to your app.
As you use GoodBarber, you don't need to do so: those 2 SDKs are already integrated into your app.

5. Go to your GoodBarber backend

Now you have to go in your GoodBarber backend, in the Audience > Statistics > External tools menu.
Enable Google Analytics by selecting "On", and copy/paste your tracking code in the dedicated field.
NB: Don't forget that the external statistics are applied by platform. It means that you need to repeat this operation for your iOS app and for your Android app.

6. Go now to the Publication > Updates menu

The last step is to publish the modifications to update your app with the new tracking code. And it's done!

Do you need to create a property for each platform, or can you use the same for iOS and Android?

It's a very subjective point, because both ways are working well. Your choice will depend on your use of Google Analytics.
I personally perfer to use a unique property, and filter my data afterwards, by using segments, or profiles. It allows me to compare easily the data between my Android and my iOS apps.
But if you're used to operate with different properties, feel free to repeat this process two times : one time for your iOS app, and one time for your Android app.
So, those are the basic steps to plug Google Analytics into your mobile app. Don't waste too much time before doing it: the earlier your app will be set up to track its stats in Google Analytics, the more you'll have data to analyze later.
In a next post, we'll see together how you can use segments to compare your iOS and Android users behavior. We'll also have a look to the links between Google Analytics and Google Play, and you'll see that there is also a gold mine of data to analyze.