我收到很多回復,說我的Google跟蹤代碼在很多方面都過分了,我懷疑可能並非所有功能都能正常工作。 (例如,某些指標沒有顯示數據:「付費流量」和「廣告系列」)Google渲染錯誤的跟蹤代碼?
谷歌是否可能呈現比有用的跟蹤代碼少的內容?
我應該回到舊格式的跟蹤代碼,因爲我知道他們工作正常嗎?
它可能是我的網頁上的位置?谷歌建議</head>
之前,但這裏的每個人都推薦</body>
之前。
什麼谷歌渲染對我來說:(當前)
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-40498113-1', 'caseykidd.com');
ga('send', 'pageview');
</script>
我的舊跟蹤代碼:(約一年前)
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-28036048-1']);
_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>
當我從Google獲取第二個跟蹤代碼時,我仍然收到第二個跟蹤代碼。您是否嘗試將跟蹤代碼與Google插入網頁的內容進行比較? – 2013-05-14 02:28:33
@StevenVondruska實際上,[跟蹤代碼JS](https://developers.google.com/analytics/devguides/collection/analyticsjs/advanced)中發生了一些變化。 – likeitlikeit 2013-05-14 02:32:15
不,這兩個都來自Google Analytics網站,他們爲您的網站生成基本代碼。第二個是大約一年前。 – pianoman 2013-05-14 02:34:14