我試圖在單擊按鈕時跟蹤呼叫電話事件。我的 GA 代碼是從設置向導中提供的。<!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id={{site.google_analytics_tracking_id}}"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', '{{site.google_analytics_tracking_id}}'); </script>我的按鈕代碼是:<!-- Banner --><section id="banner"> <div class="inner"> <header> <h2>{{ site.title }}</h2> <figure> <picture class="image logo"> <span class="icon logo fa-balance-scale"></span> </picture> <figcaption><small>Serving: {{ site.location }}</small></figcaption> </figure> </header> <p><strong>We Work Hard To Protect Your Rights!</strong></p> <footer> <ul class="buttons stacked"> <button class="button fit">Call: <a href="tel:{{site.tel}}" onClick=”ga('send', 'event', 'Calls', 'clicked', 'Contact Office', 1);”>{{site.tel}}</a></button> </ul> </footer> </div></section>投票請對問題投贊成票或反對票。在否決投票之前,建議編輯或發表評論?
為什么我的 Google Analytics callto 事件跟蹤代碼沒有跟蹤?
陪伴而非守候
2021-10-21 15:03:56