谷歌分析事件跟踪不起作用 [英] Google analytics event tracking not working

查看:161
本文介绍了谷歌分析事件跟踪不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有此代码设置可用于跟踪通过Google Analytics下载的图片下载。

I have this code setup to track image downloads throught Google Analytics.

<a href="/media/37768/CC20100117m001_thumb_2000.jpg"
    onclick="pageTracker._trackEvent('Image', 'Download', 'file.jpg');" 
    class="hi-res track">
Hi-Res</a>

但是这些事件在GA报告中没有出现过。

But the events don't ever show up in the GA reports.

我想也许浏览器正在运行javascript之前的链接,但设置href =#也不起作用。

I thought maybe the the browser was following the link before the javascript was being run but setting href="#" doesn't work either.

您有什么想法?

推荐答案

您的浏览器可能会在Google Analytics(分析)使通话记录该事件之前关联该链接。查看Google的解决方案此页:

http://www.google.com/support/googleanalytics/bin/answer.py?hl=zh_CN&answer=55527

Your browser may be following the link before Analytics can make the call logging the event. Check out this page for Google's solution:
http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&answer=55527

这篇关于谷歌分析事件跟踪不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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