【发布时间】:2014-02-03 11:08:03
【问题描述】:
这是我的新分析代码:
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-000000-0', 'mysite.com');
ga('send', 'pageview');
</script>
我在分析 api 中发现,我设置了一个自定义变量,例如:
_gaq.push(['_setCustomVar',
1, // This custom var is set to slot #1. Required parameter.
'Items Removed', // The name acts as a kind of category for the user activity. Required parameter.
'Yes', // This value of the custom variable. Required parameter.
2 // Sets the scope to session-level. Optional parameter.
]);
但是变量“_gaq”没有被拒绝,我应该把这段代码放在哪里? 我的分析就在标签之后
【问题讨论】:
-
Universal Analytics 中没有自定义变量(也没有 _gaq 变量),而是用谷歌搜索“自定义维度”。
标签: google-analytics google-analytics-api