简体   繁体   English

从自定义Google Analytics(分析)跟踪器查看数据

[英]Viewing Data from Custom Google Analytics Tracker

I am trying to track the usage of a custom feature on my website using Google Analytics and Custom Trackers (see: https://developers.google.com/analytics/devguides/collection/analyticsjs/creating-trackers ) 我正在尝试使用Google Analytics(分析)和“自定义跟踪器”跟踪网站上自定义功能的使用情况(请参阅: https : //developers.google.com/analytics/devguides/collection/analyticsjs/creating-trackers

When I am creating the tracker, I am assigning a name like so 创建跟踪器时,我会分配一个类似的名称

ga('create', 'UA-XXXX-X', 'auto', 'myTrackersName');

I am then later setting data onto my tracker 然后,我稍后将数据设置到我的跟踪器上

ga('myTrackersName.set', {
    projectId: id
 });

After the use is done using the feature triggered by a save event), I then send the data to GA 使用通过保存事件触发的功能完成使用后),然后将数据发送到GA

ga('myTrackersName.send', 'event', {
  eventCategory: 'Build Sent',
  eventAction: 'Success',
  eventLabel: timeElapsed
});

When I sign into the GA dashboard, I can see my 'Build Sent' events with the action and label properly set, but I can not find the rest of the tracker's info. 登录GA信息中心后,可以看到正确设置了操作和标签的“构建已发送”事件,但是找不到其余的跟踪器信息。 When using the Google Analytics Debug extension, I can see that all of the information is being in the request, but I can not see it in any of the reports. 使用Google Analytics Debug扩展时,我可以看到所有信息都在请求中,但在任何报告中都看不到。

Is that data viewable, or do I need to enable some other feature to get access to it? 该数据是可见的,还是我需要启用其他功能才能访问它? Also, is there a way to have data that is sent from 'myTrackersName' to be set aside in GA reports so that the Event Categories are related (sent by) specifically to that tracker? 此外,是否有一种方法可以将从“ myTrackersName”发送的数据保留在GA报告中,以便事件类别专门与该跟踪器相关(发送)?

You cannot make up fieldnames like "projectId" and expect them to be displayed in the standard reports. 您不能组成字段名称,例如“ projectId”,并且不能期望它们在标准报告中显示。

You ca, however, create a custom dimension in the property settings/custom definitions and name it "projectId" for the interface. 但是,您可以在属性设置/自定义定义中创建自定义维度,并将其命名为接口的“ projectId”。 In the code you need to refer to it via the prefix "dimension" and the numeric index. 在代码中,您需要通过前缀“ dimension”和数字索引来引用它。 So for the first custom dimension this would look like 因此,对于第一个自定义维度,

ga('myTrackersName.set', {
    'dimension1': id
 });

Even so this will not be part of the standard reports by default, you need to either set this as secondary dimension or create a custom report. 即使如此,默认情况下这也不属于标准报告的一部分,您需要将其设置为次级维度或创建自定义报告。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM