0

so after taking a painful amount of time I was able to create my first android app! But now I want to integrate google analytics so that I can keep a track of how users are interacting with my app. I have tried a few sources;

Link 1

(I am completely stumped at the 3rd step mentioned in Link1)

Link 2

Link 3

I failed to complete the steps given in the above mentioned links and now my question is can somebody recommend the easiest way for a newbie to integrate google analytics in an existing android app. Even if i can get a couple of event tracked it would be mean success and I am sure I will be able to build from there.

Community
  • 1
  • 1
shahz
  • 598
  • 1
  • 8
  • 20
  • see this tutorial will helpful http://www.androidhive.info/2015/08/android-integrating-google-analytics-v4/ – Pratik Tank Feb 29 '16 at 13:12
  • google analytics is good but i have recently discovered fabric by twitter, its really easy to integrate into your app and it has a great web interface & mobile app. https://get.fabric.io/ – Gareth Price Feb 29 '16 at 13:21

1 Answers1

0

The part you are stumped on is adding the meta-data tags?

You just need to add the quoted lines inside the "Application" section of your Android Manifest.

<Application>

All of your activities etc...

<meta-data android:name="com.google.android.gms.version"
           android:value="@integer/google_play_services_version" />
<meta-data android:name="com.google.android.gms.analytics.globalConfigResource"
           android:resource="@xml/global_tracker"/>

</Application>

Personally I would use Google's own instructions as any you may find on a blog etc could be out of date.

johnnyRose
  • 7,310
  • 17
  • 40
  • 61
Kuffs
  • 35,581
  • 10
  • 79
  • 92