我在Google Analytics中为文件下载添加了一个跟踪事件_trackEvent()
,但它没有起作用。我已经等待了24小时,以便在Google Analytics的事件跟踪中进行更新。
我的代码是:
<a class="buttonstyle" href="/DownloadDocuments/WINTER_2012_Magazine_visual.pdf" target="_blank" onclick="return documentDownload(this, 'WINTER_2012_Magazine_visual.pdf');">Download</a>
<script>
function documentDownload(link, downloadFileName) {
_gaq.push(['_trackEvent', 'Downloads', 'Click', downloadFileName]);
setTimeout('document.location = "' + link.href + '"', 500);
return false;
}
</script>
我已经在控制台上检查过了,看起来对我来说很好:
_gaq.push processing "_trackEvent" for args: "[Downloads,Click,WINTER_2012_Magazine_visual.pdf]": ga_debug.js:18
Track Event ga_debug.js:18
Tracking beacon sent!
utmwv=5.3.8d&utms=15&utmn=1916071374&utmhn=www.testmarketingstore.co.uk&utmt=event&utme=5(Downloads*Click*WINTER_2012_Magazine_visual.pdf)&utmcs=UTF-8&utmsr=1920x1080&utmvp=1903x955&utmsc=32-bit&utmul=en-gb&utmje=1&utmfl=11.5%20r31&utmdt=Test%20Marketing%20Store&utmhid=972203903&utmr=-&utmp=%2Fasp%2Fca%2Fced.asp%3FdisplayType%3Ddocs%26searchCriteria%3Duseful&utmac=UA-XXXXX-X&utmcc=__utma%3D231962136.231857795.1353415477.1353932330.1353939554.6%3B%2B__utmz%3D231962136.1353415477.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B&utmu=yAAAAAAAAC~ ga_debug.js:18
Account ID : UA-XXXXX-X
Page Title : Test Marketing Store
Host Name : www.testmarketingstore.co.uk
Page : /asp/ca/ced.asp?displayType=docs&searchCriteria=useful
Referring URL : -
Hit ID : 972203903
Hit Type : event
Event Name : Downloads
Event Type : Click
Event Label : WINTER_2012_Magazine_visual.pdf
Visitor ID : 231857795
Session Count : 6
Session Time - First : Tue Nov 20 2012 12:44:37 GMT 0000 (GMT Standard Time)
Session Time - Last : Mon Nov 26 2012 12:18:50 GMT 0000 (GMT Standard Time)
Session Time - Current : Mon Nov 26 2012 14:19:14 GMT 0000 (GMT Standard Time)
Campaign Time : Tue Nov 20 2012 12:44:37 GMT 0000 (GMT Standard Time)
Campaign Session : 1
Campaign Count : 1
Campaign Source : (direct)
Campaign Medium : (none);
Campaign Name : (direct)
Language : en-gb
Encoding : UTF-8
Flash Version : 11.5 r31
Java Enabled : true
Screen Resolution : 1920x1080
Browser Size : 1903x955
Color Depth : 32-bit
Ga.js Version : 5.3.8d
Cachebuster : 1916071374
请问有人能给我一些关于如何追踪问题的建议吗?