电话号码的 Google 事件跟踪 [英] Google Event tracking for phone number

查看:20
本文介绍了电话号码的 Google 事件跟踪的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行一个 WordPress 网站,该网站已通过 Google 网站管理员工具验证,并且具有与 Google Analytics(分析)相关联的 GA 代码.

I am running a WordPress site, which is verified with Google Webmaster Tools and has a GA code associated with Google Analytics.

我在网络上做了一些研究,为移动设备中的可点击电话号码添加了一个事件跟踪器,以便我可以衡量有多少人实际使用了我们为客户开发的网站主页上的电话号码:posanarestaurant.com.

I've done some research on the web to add an Event tracker for clickable phone numbers in mobile, so that I can measure how many people actually use the phone number on the homepage of the website we developed for a client: posanarestaurant.com.

大多数提供如何执行此操作的博客只是给了我此代码以添加到我的网站以下:

Most of the blogs that offered up how to do this simply gave me this code to add to my site below:

<a href="tel:18285053969" onclick="_gaq.push(['_trackEvent','电话跟踪','点击/触摸','首页横幅']);">828.505.3969

他们说谷歌将在 24 到 48 小时内开始接受跟踪,但我在 GA 中还没有看到任何东西.

They said that Google would start to pick up tracking in 24 to 48-hours, but I haven't seen anything in GA yet.

我知道有一些 javascript 可能会出现在网站的头部,但是我正在使用的插件之一已经添加了该 javascript,所以我不想重复在网站负责人.

I know that there is some javascript that might go in the head of the site, but one of the plugins I'm using already adds that javascript, so I don't want to duplicate having two exact same javascript references in the head of the site.

我做错了什么?

推荐答案

UA 事件跟踪的语法是

The syntax for UA event tracking is

ga('send', 'event', 'Phone Call Tracking', 'Click/Touch', 'Home Banner')

所以你的完整代码是

<a href="tel:18285053969" onclick="ga('send', 'event', 'Phone Call Tracking', 'Click/Touch', 'Home Banner');">828.505.3969</a>

完成该设置后,如果您没有过滤掉自己的视图,您可以在实时报告中检查事件命中情况(这样您就不必等待 24 小时来查看它是否有效).

Once you have that set, and if you are not filtering out your own views, you can check for the event hit in Real-Time reports (so you don't have to wait 24 hours to see if it's working).

这篇关于电话号码的 Google 事件跟踪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆