Angularjs 谷歌分析实时事件不是';不要用角捕捉
我已经在我的开发环境中安装了跟踪代码。我包括了分析的调试版本,我正在发送一些角度函数中的事件。下面是一个例子:Angularjs 谷歌分析实时事件不是';不要用角捕捉,angularjs,google-analytics,Angularjs,Google Analytics,我已经在我的开发环境中安装了跟踪代码。我包括了分析的调试版本,我正在发送一些角度函数中的事件。下面是一个例子: window.ga_debug = {trace: true}; ga('send', { hitType: 'event', eventCategory: 'Freelancer Application', eventAction: 'submit',
window.ga_debug = {trace: true};
ga('send', {
hitType: 'event',
eventCategory: 'Freelancer Application',
eventAction: 'submit',
eventLabel: 'Role'
});
使用调试器,我可以看到事件正在发送,并且请求成功。请参见下面的调试输出。然而,事件几乎从不间断地显示,没有任何代码更改。需要注意的是,我在本地环境中的域与GA上注册的域不匹配,但据我所知,这并不是导致此问题的原因
window.ga_debug = {trace: true};
ga('send', {
hitType: 'event',
eventCategory: 'Freelancer Application',
eventAction: 'submit',
eventLabel: 'Role'
});
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
我从调试输出中复制了有效负载字符串,替换了我自己的UAID并粘贴到浏览器中——正如预期的那样,事件出现了。接收端是否配置了可能会干扰您事件的内容(可能是过滤器)?@EikePierstorff怪异-这是一个全新的GA帐户,根本没有应用任何过滤器。我有点困惑,您的点击是发送的-“nuno/app.html”不是完全限定的域名(错过TLD),我不会想到GA可以在这里设置cookie,如果没有cookie,它通常会中止。但是调试器显示命中已发送。你特别说的是“实时”-点击最终会出现在“永久”报告中吗?@Eikepierstorf这是一个新帐户,永久记录中没有显示任何内容。根据GA文档,“analytics.js不需要设置cookies来将数据传输到Google analytics”。Google不需要cookies,但如果您不想使用cookies,则必须将存储设置为none,然后除非您自己传递clientid,否则您将无法进行会话。如果js跟踪器不能设置cookie,它通常会退缩,这就是我想知道的原因(如果您感兴趣,可以在checkStoragetask中检查)。你能通过控制台发送一些点击来确认点击是否到达吗?