Google Analytics(分析) - 如何获取Measurement Protocol发送的client_id(匿名客户端ID) [英] Google Analytics - How to get the client_id (anonymous client id) sent with Measurement Protocol
问题描述
我们正在通过谷歌分析测量协议查找这样的请求,以跟踪用户在那里的互动情况。对我们来说,将交互链接到特定用户是很重要的,所以我们很高兴能够设置协议的cid属性。
we are seding requests like this throught the google analytics measurement protocol to track user interaction there. For us its important to be to link a interaction to a specific user so we where happy to be able to set the "cid" attribute of the protocol.
我的问题是,我无法在Google分析报告中找到此客户ID。即使在定制报告时,我也找不到可以显示此信息的维度。
my problem is that I cannot find this Client ID somewhere inside the reports of google analytics. Even when customizing the reports I cannot find a Dimension which allows me to display this information.
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
如何在这里找到cid的一个想法?
Do you have an idea of how the cid could be found there?
推荐答案
客户端ID分配给用户(客户端)查看您的网站谷歌分析。这是一个如何使用jQuery获取客户端ID的例子。
Client id is assigned to a user(client) viewing your site by google analytics. Here is an example of how you can get the client id if you're using jQuery.
$(document).ready(function() {
setGaClientId();
});
var setGaClientId = function(){
if(typeof(ga) != 'undefined'){
ga(function(tracker) {
console.log(tracker.get('clientId')); //actually do something here
});
}
}
这篇关于Google Analytics(分析) - 如何获取Measurement Protocol发送的client_id(匿名客户端ID)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!