0

即時文章配置幾個月前。我們有近300多篇文章。只要Instant Articles關注,一切工作都正常。Google Analytics(分析)無法跟蹤FB即時文章頁面瀏覽量。

我沒有意識到GA沒有跟蹤Instant Articles中的頁面瀏覽量。我跟着這個https://stackoverflow.com/a/38112027/2657566並添加了全球站點標籤。

這是我的代碼。從Wordpress即時文章插件的界面保存後,當我從手機上打開即時文章時,我沒有看到任何活躍的用戶。

你能否讓我知道如果我錯過了什麼。提前致謝。

<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','https//www.google-analytics.com/analytics.js','ga'); 

    ga('create', 'UA-XXXXXXXXX-X', 'auto'); 
    ga('set', 'campaignSource', 'Facebook'); 
    ga('set', 'campaignMedium', 'Facebook Instant Articles'); 
    ga('set', 'referrer', ia_document.referrer); 
    ga('send', 'pageview'); 

</script> 

回答

0

刪除https://開頭,並確保URL是這樣的(如果你願意脊不服務的HTTPS請求)//www.google-analytics.com/analytics.js。

相關問題