谷歌Analytics(分析)在简易追踪自定义屏幕名称自定义、简易、屏幕、名称

2023-09-05 03:19:11 作者:赖着不放掉

我有一个重复的活动(其用于不同的目的,所以只跟踪活动名称也不会帮我的应用程序,这就是为什么我要同时仍使用EasyTracker手动定义的网名。我的code相像这样的:

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);

我从这些信息https://developers.google.com/analytics/devguides/collection/android/v3/screens

我不想这样做,而不EasyTracker,因为我没有找到容易跟踪器到底发生了什么的方法activityStart()和activityStop的任何信息(),所以我不能重现此问题与自定义跟踪器,我想被收集在除了画面名称activityStart()方法inforation也是非常有用的。所以,有经验的人在轻松跟踪定义自定义值?它是一个很好的方式做这种方式还是有一个更好的解决方案?

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?

推荐答案

如果任何人遇到的问题,按照谷歌Analytics SDK的V3,

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.

在这里SCREEN_NAME是用户的再利用活动定义的常量。

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

使用的默认的custome屏幕名称,而不是IE浏览器活动的全限定路径名 不会导致数据集合中的任何问题。

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.

建议,使用谷歌标签管理器为您跟踪的目的,它为您提供如改变未来的UA属性ID以及屏幕的名字更好的灵活性发送给谷歌Analytics(分析)。阅读更多@ 开发者指南Android的

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