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?
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.
Explanation: Custom dimensions can appear as primary dimensions in Custom Reports. You can also use them as Segments and secondary dimensions in standard reports.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With