Search code examples
androidgoogle-analyticsgoogle-analytics-firebase

What is the use of ga_autoActivityTracking?


I don't understand the use and the difference which ga_autoActivityTracking makes.Even when I set it "true", I need to call sendScreenName() and then send(). So what is it doing automatically?


Solution

  • It is used for tracking your activity:

    <!-- Enable automatic Activity measurement -->
    <bool name="ga_autoActivityTracking">true</bool>
    

    if it is true in analytics.xml, it will track all the activities, if we will do the following for each of our acitivity:

    @Override
    protected void onStart()
    {
        super.onStart();
        EasyTracker.getInstance(context).activityStart(activity);
    }
    
    @Override
    protected void onStop()
    {
        super.onStop();
        EasyTracker.getInstance(context).activityStop(activity);
    }
    

    this will give results as below in the dashboard of your app in analytics portal:

    enter image description here