简体   繁体   English

Google Analytics _setCustomVar - 我的信息中心中的奇怪数据

[英]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.

相关问题 _setCustomVar等效于analytics.js - _setCustomVar equivalent for analytics.js 如何将Google Analytics(分析)自动化仪表板中的批量数据逐月划分为数据 - How do I separate bulk data in my Google Analytics automated dashboard into month by month data Google Analytics(分析)使用_setCustomVar从其他自定义变量创建自定义变量 - Google Analytics creating custom variables from other custom variables using _setCustomVar Google Analytics API JavaScript显示数据而无需登录仪表板上的用户 - Google Analytics API JavaScript show data without login to users on dashboard 如何翻译Google Analytics(分析)信息中心? - How to translate Google Analytics dashboard? Google Analytics for Shiny Dashboard App - Google Analytics for Shiny Dashboard App Google Analytics(分析)信息中心响应无效 - Google analytics dashboard response not valid 即使从网站成功触发,User_timing 谷歌分析数据也不会显示在分析仪表板上 - User_timing google analytics data not showing on analytics dashboard even if successfully fired from website 在我的网站上显示 Google Analytics 数据? - Display Google Analytics data on my web site? 使用自定义日期创建Google Analytics(分析)信息中心 - Creating Google Analytics Dashboard With Custom Dates
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM