我的开发环境中安装了跟踪代码。我包括分析的调试版本,我在一些角度函数中发送事件。这是一个例子:
window.ga_debug = {trace: true};
ga('send', {
hitType: 'event',
eventCategory: 'Freelancer Application',
eventAction: 'submit',
eventLabel: 'Role'
});
使用调试器,我可以看到正在发送事件,并且请求成功。请参阅下面的调试输出。但是,事件几乎从不间断地出现,没有任何代码更改。有一点需要注意,我在本地环境中的域名与GA上的注册域名不匹配,但据我所知,这不是造成此问题的原因。
Executing Google Analytics commands.
analytics_debug.js:9 Running command: ga("send", {hitType: "event", eventCategory: "Freelancer Application", eventAction: "submit", eventLabel: "Info"})
analytics_debug.js:9 Send start: 402598
analytics_debug.js:9 hitType="event" (temp)
analytics_debug.js:9 eventCategory="Freelancer Application" (temp)
analytics_debug.js:9 eventAction="submit" (temp)
analytics_debug.js:9 eventLabel="Info" (temp)
analytics_debug.js:9
Executing 15 filters:
analytics_debug.js:9 filter[0]: _oot
analytics_debug.js:9 filter[1]: previewTask
analytics_debug.js:9 filter[2]: checkProtocolTask
analytics_debug.js:9 filter[3]: validationTask
analytics_debug.js:9 filter[4]: checkStorageTask
analytics_debug.js:9 filter[5]: historyImportTask
analytics_debug.js:9 filter[6]: samplerTask
analytics_debug.js:9 filter[7]: _rlt
analytics_debug.js:9 _ti=1464201475750
analytics_debug.js:9 _to=19
analytics_debug.js:9 _hc=4
analytics_debug.js:9 filter[8]: ceTask
analytics_debug.js:9 filter[9]: devIdTask
analytics_debug.js:9 filter[10]: displayFeaturesTask
analytics_debug.js:9 _um=[undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, true]
analytics_debug.js:9 _j1="" (temp)
analytics_debug.js:9 filter[11]: buildHitTask
analytics_debug.js:9 usage="CACAAMABI~" (temp)
analytics_debug.js:9 _s=4
analytics_debug.js:9 hitPayload="v=1&_v=j43d&a=1869146530&t=event&_s=4&dl=http%3A%2F%2Fnuno%2Fapp.html&ul=en-us&de=UTF-8&dt=Clementine&sd=24-bit&sr=1920x1200&vp=1671x467&je=0&fl=21.0%20r0&ec=Freelancer%20Application&ea=submit&el=Info&_u=CACAAMABI~&jid=&cid=2130340064.1464195843&tid=UA-78296064-2&z=1203210418" (temp)
analytics_debug.js:9 filter[12]: _dt
analytics_debug.js:9 filter[13]: sendHitTask
analytics_debug.js:9
Sent beacon:
v=1&_v=j43d&a=1869146530&t=event&_s=4&dl=http%3A%2F%2Fnuno%2Fapp.html&ul=en-us&de=UTF-8&dt=Clementine&sd=24-bit&sr=1920x1200&vp=1671x467&je=0&fl=21.0%20r0&ec=Freelancer%20Application&ea=submit&el=Info&_u=CACAAMABI~&jid=&cid=2130340064.1464195843&tid=UA-78296064-2&z=1203210418
analytics_debug.js:9 _j1 (&jid)
analytics_debug.js:9 adSenseId (&a) 1869146530
analytics_debug.js:9 apiVersion (&v) 1
analytics_debug.js:9 clientId (&cid) 2130340064.1464195843
analytics_debug.js:9 encoding (&de) UTF-8
analytics_debug.js:9 eventAction (&ea) submit
analytics_debug.js:9 eventCategory (&ec) Freelancer Application
analytics_debug.js:9 eventLabel (&el) Info
analytics_debug.js:9 flashVersion (&fl) 21.0 r0
analytics_debug.js:9 hitType (&t) event
analytics_debug.js:9 javaEnabled (&je) 0
analytics_debug.js:9 language (&ul) en-us
analytics_debug.js:9 location (&dl) http://nuno/app.html
analytics_debug.js:9 screenColors (&sd) 24-bit
analytics_debug.js:9 screenResolution (&sr) 1920x1200
analytics_debug.js:9 title (&dt) Clementine
analytics_debug.js:9 trackingId (&tid) UA-78296064-2
analytics_debug.js:9 viewportSize (&vp) 1671x467
analytics_debug.js:9 hitCallback=[function] (temp)
analytics_debug.js:9 filter[14]: timingTask
analytics_debug.js:9 Send finished: 402631