2015-01-27 83 views
2

我的網站上有Google Analytics(admin/config/system/googleanalytics)模塊。當我去我的網站,我在控制檯收到一條錯誤消息:爲什麼谷歌分析JavaScript文件不加載?

Failed to load resource: net::ERR_NAME_NOT_RESOLVED https://www.google-analytics.com/analytics.js 

即使當我進入我的谷歌Analytics帳戶,他們給我下面的代碼放在:

<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-myid-4', 'auto'); 
    ga('send', 'pageview'); 

</script> 

如果我嘗試訪問該網址,則會顯示「此網頁不可用」。

回答

4

原來我在主機文件中封鎖了它。