0

我进行了双重和三重检查,我的代码片段在主页中(http://www.eventridersassociation.org.uk/index.html)。但 GA 拒绝承认它。

该页面只是定时重定向到 Wordpress 站点(我尝试过没有超时):

<!DOCTYPE html>
<html>
<head>
    <title>Redirect</title>
    <script type="text/javascript">

        var _gaq = _gaq || [];
        _gaq.push(['_setAccount', 'UA-6484009-3']);
        _gaq.push(['_trackPageview']);

        (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>

</head>
<body>
<a href="http://eventridersassociation.org.uk/members/index.php">Loading.</a>
<script type="text/javascript">


  setTimeout(function() {
  window.location = "http://eventridersassociation.org.uk/members/index.php"    

  }, 1000);



</script>
</body>
</html>

谁能看到我做错了什么?

4

1 回答 1

1

我知道您在第一个 URL 上运行它,但是在您重定向到的站点上,您调用了分析脚本两次。一次正确,一次没有ID。您是否使用了名为“Cookie Control”的插件或类似的插件?它在您网站的页脚中注入了第二个 GA 脚本,但没有设置任何变量。如果我是你,我会禁用该插件。

以下是原始 /index.html 页面上跟踪脚本的调试信息:

_gaq.push processing "_setAccount" for args: "[UA-6484009-3]": 
_gaq.push processing "_trackPageview" for args: "[]": 
Track Pageview
Tracking beacon sent!
utmwv=5.4.2d&utms=8&utmn=350399410&utmhn=eventridersassociation.org.uk&utmcs=UTF-8&utmsr=1440x900&utmvp=1440x287&utmsc=24-bit&utmul=en-us&utmje=1&utmfl=11.7%20r700&utmdt=Event%20Riders%20Association%20%7C%20We%20Are%20One%20sport%20%E2%80%A6%20One%20Voice&utmhid=1248347118&utmr=http%3A%2F%2Fwww.eventridersassociation.org.uk%2Findex.html&utmp=%2Fmembers%2F&utmht=137…15147996%2Fgetting-tracking-not-installed-from-google-analytics%3B&utmu=q~
Account ID               : UA-6484009-3
Page Title               : Event Riders Association | We Are One sport … One Voice
Host Name                : eventridersassociation.org.uk
Page                     : /members/
Referring URL            : http://www.eventridersassociation.org.uk/index.html
Hit ID                   : 1248347118
Visitor ID               : 922109071
Session Count            : 1
Session Time - First     : Thu Jun 13 2013 02:15:23 GMT-0500 (CDT)
Session Time - Last      : Thu Jun 13 2013 02:15:23 GMT-0500 (CDT)
Session Time - Current   : Thu Jun 13 2013 02:15:23 GMT-0500 (CDT)
Campaign Time            : Thu Jun 13 2013 02:15:23 GMT-0500 (CDT)
Campaign Session         : 1
Campaign Count           : 1
Campaign Source          : stackoverflow
Language                 : en-us
Encoding                 : UTF-8
Flash Version            : 11.7 r700
Java Enabled             : true
Screen Resolution        : 1440x900
Browser Size             : 1440x287
Color Depth              : 24-bit
Ga.js Version            : 5.4.2d
Cachebuster              : 350399410 

这是您重定向到的页面上的调试信息:

_gaq.push processing "_setAccount" for args: "[UA-6484009-3]": 
_gaq.push processing "_trackPageview" for args: "[]": 
Track Pageview
Tracking beacon sent!
utmwv=5.4.2d&utms=9&utmn=1819301630&utmhn=eventridersassociation.org.uk&utmcs=UTF-8&utmsr=1440x900&utmvp=1425x279&utmsc=24-bit&utmul=en-us&utmje=1&utmfl=11.7%20r700&utmdt=Event%20Riders%20Association%20%7C%20We%20Are%20One%20sport%20%E2%80%A6%20One%20Voice&utmhid=238588836&utmr=-&utmp=%2Fmembers%2F&utmht=1371108346526&utmac=UA-6484009-3&utmcc=__utma%3D89671247.922109071.1371107723.1371107723.1371107723.1%3B%2B__utmz%3D89671247.1371107723.1.1.utmcsr%3Dstackoverflow.com%7Cutmccn%3D(referral)%7Cutmcmd%3Dreferral%7Cutmcct%3D%2Fquestions%2F15147996%2Fgetting-tracking-not-installed-from-google-analytics%3B&utmu=q~
Account ID               : UA-6484009-3
Page Title               : Event Riders Association | We Are One sport … One Voice
Host Name                : eventridersassociation.org.uk
Page                     : /members/
Referring URL            : -
Hit ID                   : 238588836
Visitor ID               : 922109071
Session Count            : 1
Session Time - First     : Thu Jun 13 2013 02:15:23 GMT-0500 (CDT)
Session Time - Last      : Thu Jun 13 2013 02:15:23 GMT-0500 (CDT)
Session Time - Current   : Thu Jun 13 2013 02:15:23 GMT-0500 (CDT)
Campaign Time            : Thu Jun 13 2013 02:15:23 GMT-0500 (CDT)
Campaign Session         : 1
Campaign Count           : 1
Campaign Source          : stackoverflow
Language                 : en-us
Encoding                 : UTF-8
Flash Version            : 11.7 r700
Java Enabled             : true
Screen Resolution        : 1440x900
Browser Size             : 1425x279
Color Depth              : 24-bit
Ga.js Version            : 5.4.2d
Cachebuster              : 1819301630 
于 2013-06-13T07:30:04.700 回答