我正在寻找一种从Google Analytics(分析)中导出每个唯一身份访问者的方法。因此,访问者可以多次打开一个网站,我想导出一行,其中包含有关访问的一些信息,例如网站的平均时间,购买次数,平均订单金额等。
提前致谢。
Stefan,我建议为此使用customVariables。
只需确保在调用_trackPageview之前放置了此代码即可。
_gaq.push(['_setCustomVar',
1, // This custom var is set to slot #1.
'VisitorID', // Name of your CustomVar that will show up in Reports
'123456789', // ID of your visitors, you need to set this.
1 // Set the scope to visitor-level.
]);
棘手的部分可能是使用一致地实际获取访客ID。一种方法是实际使用与_utma cookie中的Google Analytics(分析)存储相同的访客ID(本文中的详细信息)。
完成此操作的完整代码如下:
var a = uGC(document.cookie, '__utma=', ';');
var id = a.split(".")
_gaq.push(['_setCustomVar', 1, 'VisitorID', id[1], 1]);
之后,您可以使用VisitorID作为主要维度来构建自定义报告,然后选择要查看的任何指标。只需使您使用维度/指标的正确和逻辑组合即可获得实际上有意义的数字(请参阅Avinash Kaushik撰写的精彩文章)。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句