因为我无法使用这样的代码同时为同一插槽设置多个值
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'XXXXXXXX']);
_gaq.push(['_setDomainName', 'mydomain.com']);
_gaq.push(['_setCustomVar',1,'ONE',"www.mydomain.com/ONE",1]);
_gaq.push(['_setCustomVar',1,'TWO',"www.mydomain.com/ONE",1]);
_gaq.push(['_setCustomVar',2,'THREE',"www.mydomain.com/ONE",1]);
_gaq.push(['_setCustomVar',2,'FOUR',"www.mydomain.com/ONE",1]);
_gaq.push(['_trackPageview']);
是否有不同的策略来获得相同的结果?
最佳答案
是的。您可以使用分隔字符 value1#value2#value3 连接多个值,将它们作为单个变量发送,并使用正则表达式根据各个部分创建段或过滤器。
请注意,total number of characters 存在限制。 :
The total combined length of any custom variable name and value may not exceed 128 characters.
关于google-analytics - Google Analytics 自定义变量每个槽有多个值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22150135/