2

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?

Shubham Garg
  • 111
  • 7
  • Duplicate: http://stackoverflow.com/questions/24474203/is-there-any-code-needed-in-activity-so-that-ga-autoactivitytracking-true-woul – adavea Mar 09 '15 at 01:30

2 Answers2

3

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

Amrut Bidri
  • 6,276
  • 6
  • 38
  • 80
-2

I found out that if ga_autoActivityTracking=True, you just need to make sure that you put sendScreenName() in each activity instead of writing separate code for each activity.

Shubham Garg
  • 111
  • 7