How to track your android app by google analytics v4 Chapter-1

Updated 27 September 2023


In this blog,
I have shown, How to track your android Application by a great and free analytics tool.
There are many analytics tools which can be used the like Segment.ioMixPanelLocalytics, Amazon Mobile Analytics etc. But They are not totally free and easily understandable.

So, here I am showing how to implement Google Analytics v4 in your application with a lot of key features like create multiple views according to different countries times, real-time users, bug report, active users and many more.
This is absolutely free of cost and easy to implement.

The Screen-shot of the real time users of Mobikul-OC-Demo App.

Real Time Users
Real Time Users

How to get the analytics credentials

There are some easy steps to setup the google analytics to your app

  1. Sign In to your Google Analytics account.
  2. Select Mobile App in the new property form.
  3. Enter Account Name.
  4. Enter the App Name.
  5. Select Industry Category & Report Time Zone and click on Get Tracking ID.
  6. In the next screen you will be shown your property Tracking ID.

How to add Analytics to Your Android App

Step 1: Add permission to your manifest.xml

Step 2: Add a plugin to your project in your top-level build.gradle and your app-level build.gradle files as follows:

Step 3: Get a configuration file by this link.


Step 4: Copy the google-services.json file into your app/ or mobile/ directory of your Android Studio project.

How to track your Activity

There is some block of code to track your application’s current activity


Next Chapter

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


  • Shubham Agarwal
  • How to track your android app "Exceptions and Crashes" by google analytics v4 Chapter-2 - Mobikul
  • Start a Project

      Message Sent!

      If you have more details or questions, you can reply to the received confirmation email.

      Back to Home