本文介绍了Google Analytics中的_trackEvent()不起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的网站上设置了Google Analytics(分析),它绝对可以记录网页浏览量。但我添加了一些代码来调用 pageTracker._trackEvent(category,action,label,value),它不会记录这些匹配或在报告中显示它们。 p>

顺便说一句,是的,我已经等了超过24小时,看看这些报道是否在报道中。

我有使用标准Google脚本包括以及提及的技术。这两个人似乎都不能帮助 _trackEvent()问题。



任何人都可以给我一些关于如何追踪怎么了?我很乐意发布代码示例,如果你让我知道哪些部分是重要的。



谢谢。

解决方案

问题是我在最后一个参数中输入的值,即value参数。

  pageTracker._trackEvent(category,action,label,value)

整数字符串到value参数:

  pageTracker._trackEvent(UserAction,ShowHelp,Page,的 http:// mysite的/ UrlGoesHere); 

但文档说它需要是一个整数值。

  pageTracker._trackEvent(UserAction,ShowHelp,http:// mysite / UrlGoesHere,1); 

我提出了的链接



感谢您的帮助Török


I have Google Analytics setup on my site, and it is definitely recording page views. But I have added some code to call pageTracker._trackEvent(category, action, label, value), and it is not recording those hits or showing them in the reports.

BTW, yes, I have waited for over 24hrs to see if the hits are in the reports.

I have used the standard Google script include as well as the technique mentioned here. Neither one seems to help the _trackEvent() problem.

Can anyone give me some advice on how to track down what's going wrong? I'd be happy to post code examples if you let me know what parts are important.

Thanks.

解决方案

The problem was the values that I was putting in the final argument, the "value" parameter.

pageTracker._trackEvent(category, action, label, value)

I was passing non-integer strings to the "value" parameter:

pageTracker._trackEvent("UserAction", "ShowHelp", "Page", "http://mysite/UrlGoesHere");

but the docs say it needs to be an integer value.

pageTracker._trackEvent("UserAction", "ShowHelp", "http://mysite/UrlGoesHere",  1);

I posed the question on Google Help Forums here.

And here is a link to the Event Tracking docs

Thanks for the help Török

这篇关于Google Analytics中的_trackEvent()不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 19:44