因为我无法使用这样的代码同时为同一个插槽设置多个值
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']);
是否有不同的策略来获得相同的结果?
最佳答案 是.您可以使用分隔字符值1#value2#value3连接多个值,将它们作为单个变量发送,并使用正则表达式根据各个部分创建段或过滤器.
请注意,虽然total number of characters有限制:
The total combined length of any custom variable name and value may
not exceed 128 characters.