Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google analytics custom screen names in Easy Tracker

I have an application with a reused activity (its used for different purposes so just tracking the activity name would not help me, thats why I want to define the screen name manually while still using the EasyTracker. My code looks like this:

EasyTracker t = EasyTracker.getInstance(this);
t.set(Fields.SCREEN_NAME, screenName);
// MapBuilder map = MapBuilder.createAppView();
// map.set(Fields.SCREEN_NAME, screenName);
// t.send(map.build());
t.activityStart(this);

I got these information from https://developers.google.com/analytics/devguides/collection/android/v3/screens

I dont want to do this without the EasyTracker because I didn't find any information what exactly happens in the methods activityStart() and activityStop() of the easy tracker so I cant reproduce this behaviour with a custom tracker and I think the inforation which is collected in the activityStart() method in addition to the screen name is also very usefull. So has someone experience with defining custom values in the easy tracker? Is it a good way to do it this way or is there a better solution?

like image 714
Simon Avatar asked Aug 21 '13 13:08

Simon


People also ask

What is screen name in Google Analytics?

Google Analytics records screens as App Views/Screen Views. The App View/Screen View is used to populate Google Analytics information such as: Screen Name: What the screen is called. Screen Views: How many times the screen has been seen.

How can the custom dimensions be used?

Explanation: Custom dimensions can appear as primary dimensions in Custom Reports. You can also use them as Segments and secondary dimensions in standard reports.

What is a screen class in Google Analytics?

The screen class is the UIViewController or Activity that is currently in focus. Analytics automatically collects information about the screen class when you connect your app.


1 Answers

If anyone comes across the question, the as per the v3 of the Google Analytics SDK,

    EasyTracker.getInstance(this).activityStart(SCREEN_NAME);  // Add this method.

where SCREEN_NAME is the user defined constant for the reused Activity.

Using custome screen names instead of the default ones i.e the full qualified path name of the Activity doesn't cause any issues in data collection.

Recommendation, Use Google Tag Manager for your Tracking purpose, it provide you better flexibility like changing the UA property ID in future as well the screen names to be sent to Google Analytics. Read more @ Developer Guide For Android

like image 170
Sudhir Mishra Avatar answered Oct 22 '22 13:10

Sudhir Mishra