Javascript 谷歌分析代码没有记录流量?

Javascript 谷歌分析代码没有记录流量?,javascript,google-analytics,Javascript,Google Analytics,我客户的一个网站的谷歌分析代码不起作用 这段代码有什么问题 <script type='text/javascript'> var gaJsHost = ((&quot;https:&quot; == document.location.protocol) ? &quot;https://ssl.&quot; : &quot;http://www.&quot;); document.write(unescape(&quot;

我客户的一个网站的谷歌分析代码不起作用

这段代码有什么问题

<script type='text/javascript'>
var gaJsHost = ((&quot;https:&quot; == document.location.protocol) ? &quot;https://ssl.&quot; : &quot;http://www.&quot;);


document.write(unescape(&quot;%3Cscript src=&#39;&quot; + gaJsHost + &quot;google-analytics.com/ga.js&#39; type=&#39;text/javascript&#39;%3E%3C/script%3E&quot;));


</script>
<script type='text/javascript'>
try {
var pageTracker = _gat._getTracker(&quot;UA-8830811-1&quot;);


pageTracker._trackPageview();
} catch(err) {}</script>

var gaJsHost=((“https:==document.location.protocol)?”https://ssl." : "http://www.");
document.write(unescape(“%3Cscript src=';”+gaJsHost+“google analytics.com/ga.js';type=';text/javascript';%3E%3C/script%3E”);
试一试{
var pageTracker=_gat._getTracker(“UA-8830811-1”);
页面跟踪器。_trackPageview();
}捕获(错误){}

问题在于所有额外的实体编码(即
等)。此外,一旦使用正确的代码,它可能需要24小时才能开始显示数据,但通常在几小时内它会显示绿色”√“表示跟踪代码已正确安装。请改用此代码:

<script type='text/javascript'>
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");

document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type='text/javascript'>
try {
  var pageTracker = _gat._getTracker("UA-8830811-1");
  pageTracker._trackPageview();
} catch(err) {}
</script>​​

var gaJsHost=((“https:==document.location.protocol)?”https://ssl." : "http://www.");
write(unescape(“%3Cscript src=”+gaJsHost+“google analytics.com/ga.js”type='text/javascript'%3E%3C/script%3E”);
试一试{
var pageTracker=_gat._getTracker(“UA-8830811-1”);
页面跟踪器。_trackPageview();
}捕获(错误){}
​​

到底是什么问题?如果您刚刚安装了该代码,您必须等待一天才能看到Google Analytics的更新?