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


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
    Nice Aman. Pictures used in the blog helps a lot in explaining the content. Thanks for sharing the code snippets. It help me in implementing the same in Mobikul Magento Application
  • How to track your android app "Exceptions and Crashes" by google analytics v4 Chapter-2 - Mobikul
    […] Previous Chapter […]
  • css.php

    Great Product, Great Team, and Great Support Service. And if you want to add more features to the product, they can submit any idea that comes to your mind. They really care about their clients and we are really happy and honored to deal with Webkul.

    Talk to Sales


    Live Chat
    Start a Project

      Message Sent!

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

      Back to Home