使用谷歌通用分析进行事件跟踪

Event Tracking Using Google Universal Analytics

本文关键字:事件 跟踪 谷歌      更新时间:2023-09-26

我看到了关于这个问题的其他主题。我试图搜索但无法弄清楚,所以我需要帮助。

我的跟踪代码是...

<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-41800392-1', 'monsourlawfirm.org');
  ga('send', 'pageview');
</script>

该事件是在网站上单击以调用。 其代码是...

<a href="tel:8882594979" onClick="ga('send', 'mobile', 'click to call', '888-259-4979');">1 (888) 259-4979</a>

我已经等了 24 小时,没有看到任何录音。

您缺少命中类型参数。查看通用分析文档。您的活动应该是:

<a href="tel:8882594979" onClick="ga('send', 'event', 'mobile', 'click to call', '888-259-4979');">1 (888) 259-4979</a>

您可以使用监控 http 请求的工具或通过登录您的 GA 帐户并查看实时报告来验证事件是否正在触发。