1
我想跟踪页面上的JavaScript事件,但我不想跟踪页面视图本身。如果我删除下面的['_trackPageview']
,那么GA仍然会正确包含在页面中,并且它会跟踪JavaScript事件吗?或者您是否需要跟踪包含GA的页面?将Google Analytics(分析)包含在页面中而不跟踪该页面?
_gaq.push(
['_setAccount', 'XX-111111-1'],
['_trackPageview'] //get rid of this line
);
(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);
})();
好的谢谢你。 – edwardmlyte 2011-05-23 14:32:04