2015-06-11 53 views
1

我在頁面跟蹤器下面有我的錨,但我沒有看到我的廣告系列被跟蹤,導致我相信google腳本正在頁跟蹤的第一部分進行頁面跟蹤。如何使用Google Analytics setAllowAnchor標誌2

var _gaq = _gaq || []; 
 
_gaq.push(['_setAccount', 'UA-743349-4']); 
 
_gaq.push(['_setDomainName', 'www.mitchellandmitchell.com']); 
 
_gaq.push(['_setAllowLinker', true]); 
 
_gaq.push(['_trackPageview']); 
 

 
(function() { 
 
\t var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; 
 
\t ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; 
 
\t var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); 
 
})(); 
 

 
</script><link rel="alternate" media="only screen and (max-width: 640px)" href="http://www.mitchellandmitchell.com/m/accountants_cpas/professional_liability.aspx" /><meta name="p:domain_verify" content="e79bbca85a3efe326151fff57604414c" /> 
 
<script> 
 
    (function(f,b,g){ 
 
     var xo=g.prototype.open,xs=g.prototype.send,c; 
 
     f.hj=f.hj||function(){(f.hj.q=f.hj.q||[]).push(arguments)}; 
 
     f._hjSettings={hjid:8476, hjsv:2}; 
 
     function ls(){f.hj.documentHtml=b.documentElement.outerHTML;c=b.createElement("script");c.async=1;c.src="//static.hotjar.com/c/hotjar-8476.js?sv=2";b.getElementsByTagName("head")[0].appendChild(c);} 
 
     if(b.readyState==="interactive"||b.readyState==="complete"||b.readyState==="loaded"){ls();}else{if(b.addEventListener){b.addEventListener("DOMContentLoaded",ls,false);}} 
 
     if(!f._hjPlayback &amp;&amp; b.addEventListener){ 
 
      g.prototype.open=function(l,j,m,h,k){this._u=j;xo.call(this,l,j,m,h,k)}; 
 
      g.prototype.send=function(e){var j=this;function h(){if(j.readyState===4){f.hj("_xhr",j._u,j.status,j.response)}}this.addEventListener("readystatechange",h,false);xs.call(this,e)}; 
 
     } 
 
    })(window,document,window.XMLHttpRequest); 
 
</script> 
 
<script type="text/javascript"> 
 
var _gaq = _gaq || []; 
 
_gaq.push(['_setAccount', 'UA-743349-4']); 
 
_gaq.push(['_setDomainName', 'none']); 
 
_gaq.push(['_setAllowLinker', true]); 
 
_gaq.push(['customer._setAccount', 'UA-44882616-1']); 
 
_gaq.push(['customer._setDomainName', 'none']); 
 
_gaq.push(['customer._setAllowLinker', true]); 
 
_gaq.push(['_setAllowAnchor', true]); 
 
_gaq.push(['customer._trackPageview']); 
 
_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);

回答

0

有你的頁面上的一些語法錯誤。您應該加載開發人員工具並檢查控制檯是否存在這些錯誤。具體而言,他們是:

if(!f._hjPlayback &amp;&amp; b.addEventListener){ 

這應該是

if(!f._hjPlayback && b.addEventListener){ 

和這條線

ga.src = ('https:' == document.location.protocol ? 'https://ssl'; 

這應該是

ga.src = ('https:' == document.location.protocol ? 'https://ssl' 

其中分號被去除。

可能這些錯誤正在打破其他跟蹤器的跟蹤。

相關問題