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

Pas*_*ana 4 javascript variables analytics google-analytics

我为我的网站设置了_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>
Run Code Online (Sandbox Code Playgroud)

在我的仪表板中,当我进入时:访客 - >自定义变量,我看到我的2个变量,但数字真的很奇怪(如40页视图,尽管我有数千页的视图).

我已经安装了2天了.

有人面临同样的问题吗?

Yah*_*hel 17

你很幸运,甚至有40个综合浏览量记录了这些变量.

你需要_setCustomVar在_trackPageview之前调用.否则,该_trackPageview调用会将数据发送到Google Analytics,之后才会设置自定义变量.如果在_setCustomVar之后设置_trackPageview,则自定义变量数据不会附加,如果__utm.gif在该页面视图期间未设置其他匹配,则数据基本上会永久消失.

(记录的40个综合浏览量可能是通过页面浏览加载后发送数据的其他页面GA调用来跟踪的).