我想在我的網站上設置谷歌分析然而,它不工作。例如,在跟蹤信息上顯示:狀態:跟蹤未安裝。我在</head>
標記之前添加了他們提供給我的header.php文件的代碼。谷歌分析不工作
我添加的代碼是:
<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-41420598-1', 'example.com');
ga('send', 'pageview');
</script>
我看到我的網站下的頁分析部分,卻得到一個錯誤,說明:
Your site doesn't load ga.js from Google. If you host the Google tracking code on your
own servers, it isn't updated automatically and can miss important changes.
We didn't find a tracking snippet on your site. In-Page Analytics cannot load. Please
make sure you have tracking installed correctly. If your snippet is included in a
separate JavaScript file, you'll have to manually check it is being loaded correctly.
有人可以幫助我?我該如何解決這個問題?
給它一段時間 – akonsu
關於網站管理員的相關問題:[Google Analytics跟蹤未安裝](http:// webmasters.stackexchange.com/questions/48141/google-analytics-tracking-not-installed)和[Google Analytics(分析)仍然報告「即使代碼位於網頁上,跟蹤未安裝」(http://webmasters.stackexchange。 com/questions/48141/google-analytics-tracking-not-installed) –