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

问题描述

我正在运行一个WordPress网站,该网站已经通过Google网站管理员工具进行验证,并且拥有与Google Analytics关联的GA代码。

在手机上添加一个可点击电话号码的事件跟踪器,这样我就可以测量在我们为客户开发的网站的主页上实际使用电话号码的人数:posanarestaurant.com。



大多数提供了如何做到这一点的博客只是给了我这个代码添加到我的网站下面:

< a href =tel:18285053969onclick =_ gaq.push(['_trackEvent','电话呼叫追踪','点击/触摸','Home Banner']);> 828.505.3969< a>



他们表示Google会在24到48小时内开始追踪追踪,但我在GA中没有看到任何东西



我知道有一些JavaScript可能会在网站的头部出现,但我使用的插件之一已经添加了javascript,所以我不希望在网站的头部复制两个完全相同的JavaScript引用。



我在做什么错了?

$ b $ pre $ ga('send ','事件','电话跟踪','点击/触摸','主页')





 < a href =tel:18285053969onclick =ga('send' ,'活动','电话跟踪','点击/触摸','主页横幅');> 828.505.3969< / a> 

一旦你有了这个设置,并且如果你没有过滤掉你自己的视图,你可以检查事件在实时报告中出现(因此您不必等待24小时以查看它是否有效)。


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

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','Phone Call Tracking','Click/Touch','Home Banner']);">828.505.3969</a>

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

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.

What am I doing wrong?

解决方案

The syntax for UA event tracking is

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

So your complete code would be

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

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).

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

08-20 00:56