[英]Google Analytics _setCustomVar - strange data in my dashboard
I have set up the _setCustomVar for my website, like this: 我为我的网站设置了_setCustomVar,如下所示:
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXX']);
_gaq.push(['_setDomainName', '.blog4ever.com']);
_gaq.push(['_trackPageview']);
_gaq.push(['_setCustomVar', 1, 'B4E_Type_Pub', 'Silver_ou_Gold', 3]);
_gaq.push(['_setCustomVar', 2, 'B4E_Etat_Blog', 'normal', 3]);
(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>
In my dashboard, when I go in: Visitors -> Custom variables, I see my 2 variables but the numbers are really strange (like 40 pages views although I have many thousands pages views). 在我的仪表板中,当我进入时:访客 - >自定义变量,我看到我的2个变量,但数字真的很奇怪(如40页视图,尽管我有数千页的视图)。
I have it installed for 2 days now. 我已经安装了2天了。
Did somebody face the same problem? 有人面临同样的问题吗?
You're lucky even 40 pageviews recorded these variables. 你很幸运,甚至有40个综合浏览量记录了这些变量。
You need to call _setCustomVar
before _trackPageview. 您需要在_trackPageview之前调用
_setCustomVar
。 Otherwise, the _trackPageview
call sends the data to Google Analytics, and only after that are the custom variables set. 否则,
_trackPageview
调用会将数据发送到Google Analytics,之后才会设置自定义变量。 If you set the _setCustomVar
after the _trackPageview
, the custom variable data doesn't attach, and if no other __utm.gif
hits are set during that pageview, the data is basically gone forever. 如果在
_trackPageview
之后设置_setCustomVar
,则自定义变量数据不会附加,如果在该__utm.gif
期间没有设置其他__utm.gif
命中,则数据基本上会永远消失。
(Those 40 pageviews that recorded probably were tracked via some other on-page GA calls that are sending data after the pageview loads). (记录的40个综合浏览量可能是通过页面浏览加载后发送数据的其他页面GA调用来跟踪的)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.