Google Analytics上的多个自定义变量

Sha*_*fun 3 google-analytics

我正在尝试在Google Analytics上测试6个自定义变量.

当我进入高级细分时,我只能看到最后一个变量的访问.如何使其余的自定义变量起作用?

我不知道是否必须将_trackPageview放在一个以上,所以我尝试将它放在我的第五个频道之后它仍然无效.

这是我的代码:

<script type="text/javascript">

var _gaq = _gaq || [];

_gaq.push(['_setAccount', 'UA-XXXXXXXX-X']);
_gaq.push(["_setCustomVar", 1, "Channel", "One", 3]); 
_gaq.push(["_setCustomVar", 1, "Channel", "Three", 1]); 
_gaq.push(["_setCustomVar", 1, "Channel", "Four", 1]); 
_gaq.push(["_setCustomVar", 1, "Channel", "Five", 2]); 
_gaq.push(['_trackPageview']);  
_gaq.push(["_setCustomVar", 1, "Channel", "Six", 2]);
 _gaq.push(['_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);

  })();

</script>
Run Code Online (Sandbox Code Playgroud)

有人可以帮我弄这个吗?

如何才能使多个自定义变量起作用?

谢谢你这么!

jk.*_*jk. 8

每个请求限制为5个自定义变量.

不能在插槽中使用重复的键名.Channel变量都在插槽1中.

键名为"Channel"的自定义变量将被最后一个自定义变量覆盖.为了说明,请考虑这个:

_gaq.push(["_setCustomVar", 1, "Visitor-Type", "Member", 1]);
_gaq.push(["_setCustomVar", 1, "Visitor-Type", "Non-Member", 1]);
Run Code Online (Sandbox Code Playgroud)

自定义变量Visitor-Type将被记录为Non-member覆盖先前的自定义变量.它不会在分析中记录两者的值.

你可以试试这个:

_gaq.push(["_setCustomVar", 1, "Channel", "One", 3]); 
_gaq.push(["_setCustomVar", 2, "Channel", "Two", 1]); 
_gaq.push(["_setCustomVar", 3, "Channel", "Three", 1]); 
_gaq.push(["_setCustomVar", 4, "Channel", "Four", 1]); 
_gaq.push(["_setCustomVar", 5, "Channel", "Five", 2]);
Run Code Online (Sandbox Code Playgroud)

自定义变量使用指南.

或者,使用事件跟踪而不是部分或全部这些自定义变量.