我正在尝试为 Google Analytics 设置 5 个自定义变量,如下所示:
<script>
//<![CDATA[
var _gaq=[["_setAccount","UA-XXXXXXXXX-X"],["_trackPageLoadTime"]];
_gaq.push(['_setCustomVar', 1, 'categories', 'News', 3]);
_gaq.push(['_setCustomVar', 2, 'tags', 'something, another, passbook, iphone, ipod, ios6, insider, egift, more things, some other stuff', 3]);
_gaq.push(['_setCustomVar', 3, 'productcount', 0, 3]);
_gaq.push(['_setCustomVar', 4, 'isvideo', 'false', 3]);
_gaq.push(['_trackPageview']);
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.async=1;
g.src=("https:"==location.protocol?"//ssl":"//www")+".google-analytics.com/ga.js";
s.parentNode.insertBefore(g,s)}(document,"script"));
//]]>
</script>
我想我已经遵守了所有规则,在调用 trackPageView 之前添加了不超过 5 个自定义变量,但它们仍然没有出现在 Google Analytics 中。