簡體   English   中英

鏈接中的Google Blogger / Blogspot onclick事件不會傳遞給Google Analytics(分析)

[英]Google Blogger/Blogspot onclick event in link will not pass to Google Analytics

我在Blogger / blogspot中的帖子中包含以下代碼段,但我不會在Google Analytics(分析)中實時看到此事件。

<a href="http://example.com" target="_blank" onclick="ga( 'send', 'event', {'Ebook', 'Download', 'ebook.pdf'});"><button>Download</button></a>

僅供參考,博客中的負責人包括以下內容:

<script type="text/javascript">
        (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', 'XXX', 'auto', 'blogger');
        ga('blogger.send', 'pageview');
      </script>

(有意刪除的ID)

博客是否會阻止此類信息流向GA?

有什么可以做的嗎?

謝謝

它似乎使用的是自定義跟蹤器名稱,​​請在以下網址中詳細了解: https : //developers.google.com/analytics/devguides/collection/analyticsjs/creating-trackers

您可以嘗試以下方法:

onclick="ga( 'blogger.send', 'event', {'Ebook', 'Download', 'ebook.pdf'});"

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM