Reputation:
I want to use Google Analytics to collect more information about the use of my applications, how to add Google Analytics to my Android application?
Upvotes: 0
Views: 1075
Reputation: 1
I always like to start with a sample, you can try the Google Analytics sample first, you can download it from here.
In order to run it, you have to download a json file and add it to your project's 'app' folder, you can get that from here.
Basically just have to follow this (in comment) page with the sample you successfully build, you should be good to go. It's surprisingly simple to implement specially if you worked with other google services before, good luck!
Upvotes: 0
Reputation: 1830
That's was made very easy now a days by Android Studio guys.
i. create analaytics id from Google analytics, sign in to your google analytics account. In the home page -> choose admin -> property column ->click the first dropdown - > press create new property.
ii. In this create property screen you are going give information like whether you need analytics id for website/app, fill information you will get an tracking id.
iii. open your android studio -> your porject - > right click project name- > open module settings -> choose google analytics -> it will list the property name which you have just created, select and click okay. (It will add needed dependencie files)
That's it, you are done add events with trackers to your project.
Upvotes: 2