Hi, everyone we go through a lot of apps and websites these days, they may be related to different domains, may be no way related to each other but every website or app deals with a important topic called as “analytics”.

Today we are dealing with google analytics android tutorial, Yes this may not be a new word for few but in this google analytics android tutorial i am targeting who are new to this terminology. 



Analytics is the phenomena where the statistics of the app or website is closely observed so that the audience, their interest can be noticed by respective admins.

So here lies the point that analytics not only helps to know the audience count but also improves the overall performance of app/website in terms  of tracking bugs in time as well getting notified with reviews, and few more which may help development.


Much More Simple 

So now have you ever noticed popular website like Flipkart, Amazon, snapdeal, and many more shopping portals and their apps starts showing you products which you have stared at, purchased, or looking for  lot once you visited them.

Now, i think you understood now that by this simple example its a part of analytics and also its not that simple as it appears but lets see it in our coming tutorial.


Is this for everyone ?

When you are trying to build an app/website, ok think its done and now you want to know  who visited them and what have they been going through, how much time they are spending on your site exactly on which page this is what we are going to deal with.

Also from where i.e, country, device, service provider, gender, number of visits per hour,  day, week, monthly like what not you can know all these scenarios and much more google analytics android tutorial.


Let’s Get started :

Are you planning to start developing a new app or already having an app so this android app development tutorial is very much useful for you, lets get started today we will deal with a simple example by which we can trace out analytics of our app.

We will be using Google Firebase for tracing out app’s analytics.



Visit https://firebase.google.com    to get started

Then login in with your credentials





Then Add a project


Select Android Project


Add Firebase to your android app by mentioning package name, app name, and SHA-1.




The process of retrieving SHA-1 key is shown below




Download the json file and add it to your android studio project.

Then add dependencies


build.gradle (Project: Firebase Tutorial)


build.gradle (Module: app)


In MainActivity add FirebaseAnalytics as


Then initialize


Add a log event


Don’t forget to add internet permission to your manifest file



And that’s it now after 24 hours you will be able to track your audience


Try it out and ask me below in comment section if you have any queries.

If you require project file comment below.

Share it to your friends if you really like it.


Show Buttons
Hide Buttons
Read previous post:
Android Marshmallow Permissions | Requesting Run-Time Permissions