我正在尝试使用下面的脚本将Google的事件跟踪集成到我的应用程序中。我可以在“实时”标签中看到事件。但是我看不到“内容”标签中的事件。
var _gaq = _gaq || [];
_gaq.push(['_setDomainName', 'none']);
_gaq.push(['_setAccount', 'XXXXX']);
_gaq.push(['_trackPageview']);
_gaq.push(['_trackEvent', 'request.fullpath', 'plan_desc', 'plan_code>']);


发布于 2013-04-18 08:30:32
你在抓取定义gaq函数的脚本吗?
var _gaq = _gaq || [];
_gaq.push(['_setDomainName', 'none']);
_gaq.push(['_setAccount', 'XXXXX']);
_gaq.push(['_trackPageview']);
_gaq.push(['_trackEvent', 'request.fullpath', 'plan_desc', 'plan_code>']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();另外,对于您的事件推送,您推送的值是否应该是JS对象?如果是这样,您可能希望去掉引号。
发布于 2015-03-03 20:27:30
GA在将您实时看到的数据转换到其他部分之前需要一定的时间。
如果您只在48小时内添加了代码,那么结果可能还没有准备好查看。
发布于 2015-03-03 15:36:49
我建议你尝试google Analytics Debugger extension for Chrome,看看跟踪事件是否会到达Google。
https://stackoverflow.com/questions/16060916
复制相似问题