Google Analytics的HTTP请求(测量协议)中未跟踪自定义维度。

4
使用analytics.js时,我可以按照文档中所述的方式(链接)成功地跟踪事件,包括自定义维度。
ga('send', 'event', 'category', 'action', {
    'metric18': 8000,
    'dimension6': 'crocodile'
});

然而,当使用测量协议(即HTTP请求)时,我似乎找不到将自定义维度和指标包含到事件跟踪中的方法,因为在文档中没有找到任何参考资料。
到目前为止,这是我尝试过的内容(基于文档中找到的示例)。在这两种情况下,事件实际上已被跟踪,但没有关联任何自定义维度或指标。
http://www.google-analytics.com/collect?
 v=1             // Version.
 &tid=UA-XXXX-Y  // Tracking ID / Property ID.
 &cid=555        // Anonymous Client ID.

 &t=event        // Event hit type
 &ec=video       // Event Category. Required.
 &ea=play        // Event Action. Required.
 &metric18=8000
 &dimension6=crocodile

并且

http://www.google-analytics.com/collect?
 v=1             // Version.
 &tid=UA-XXXX-Y  // Tracking ID / Property ID.
 &cid=555        // Anonymous Client ID.

 &t=event        // Event hit type
 &ec=video       // Event Category. Required.
 &ea=play        // Event Action. Required.
 &el={"metric18":8000,"dimension6":"crocodile"}
1个回答

9
根据收集开发指南,您使用了错误的参数名称,请尝试以下内容:
http://www.google-analytics.com/collect?
 v=1             // Version.
 &tid=UA-XXXX-Y  // Tracking ID / Property ID.
 &cid=555        // Anonymous Client ID.

 &t=event        // Event hit type
 &ec=video       // Event Category. Required.
 &ea=play        // Event Action. Required.
 &cm18=8000
 &cd6=crocodile

您所查看的开发指南部分是针对 Web 跟踪 JS 而非数据采集的。


谢谢您的回答,尽管我确实在查看测量协议文档,但是我看错了部分(开发指南而不是参数参考)。 - Xevi Pujol
@XeviPujol 我想我没有写清楚,因为它们都是集合的子部分。但是,“collection/analyticsjs”链接来自于测量的错误子部分;你真的只能信任“collection/protocol”部分的具体信息。无论如何,很高兴解决了这个问题! - lossleader

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接