我正在尝试在Google Analytics跟踪中设置自定义变量,以进行非常粗略的拆分测试.
我在'head'部分末尾使用的代码是
var _gaq = _gaq || [];
_gaq.push(
['_setAccount', 'UA-xxxxxx-xx'],
['_setCustomVar', 1, 'split', '1', 2],
['_trackPageview']
);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
Run Code Online (Sandbox Code Playgroud)
页面视图跟踪正常,但我没有在"访问者"部分的"用户定义"子部分下看到"(未设置)"以外的任何内容.
谁能发现任何错误?在异步的东西出现之前,我已经使用过旧的ga.js了.
谢谢.
| 归档时间: |
|
| 查看次数: |
2193 次 |
| 最近记录: |