0
我結合谷歌分析_trackEvent和_trackPageview成一個單一的呼叫,如下所示:Google Analytics(分析):我可以將trackEvent和trackPageView整合到一個調用中嗎?
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-20822178-2']);
_gaq.push(['_setCustomVar', 1, 'My Custom Page View Variable', 'My Value']);
_gaq.push(['_trackEvent', 'My Category', 'My Action']);
_gaq.push(['_trackPageview']);
[...GA snippet insertion...]
這產生兩個__utm.gif
要求谷歌。這是可以的,除了_trackEvent
信息中的請求還包含CustomVar
信息,這使我相信Google會在這兩個請求中對瀏覽量進行計數。我不想重複計算我的頁面請求... Google的智能足以讓您拋棄_trackEvent
調用發送的綜合瀏覽量信息嗎?
謝謝!
謝謝!爲了其他人的利益,Google的文檔實際上包含此信息,但我錯過了它:http://code.google.com/intl/zh-CN/apis/analytics/docs/tracking/asyncUsageGuide.html – 2011-05-11 19:07:15