问题描述
我有一段代码可以在我的应用程序初始化时基于一组数据在Google Analytics中记录事件。它类似于
函数recordInitialData(dataArray){
for(var i = dataArray.length; i> = 0;我 - ){
_gaq.push([ _ trackEvent,类别1,动作1,label1的,dataArray中[I] .value1],[ _ trackEvent,类别2,1动作,LABEL2,dataArray中[I] .value2]);
$ / code>
问题是,
_gaq .push
被调用的次数只有10次(也就是说,只有10个1x1的gif被加载,并且只表示给出的前10个事件 _gaq.push
),无论我实际做了多少次调用(因为有时dataArray可能会很长)。谷歌分析只提到500事件的限制每个用户会话推()。
解决方案
从:
您可以一次发送10个,然后他们然后在每秒1次请求补充。
I have a piece of code that records events in Google Analytics based on an array of data when my application initializes. It goes something like
function recordInitialData(dataArray) {
for(var i = dataArray.length; i >= 0; i--) {
_gaq.push(["_trackEvent", category1, action1, label1, dataArray[i].value1],["_trackEvent", category2, action2, label2, dataArray[i].value2]);
}
}
The problem is, _gaq.push
gets called only 10 times (that is to say, there are only 10 1x1 gifs loaded and represent only the first 10 events that were given to _gaq.push
), no matter how many calls I actually make (because sometimes dataArray can be quite long). Google Analytics only mentions a limit of 500 event pushes per user session (Analytics Docs). Has this limit of "10 at a time" been documented anywhere?
解决方案 Got an answer from Google directly:
"you can send 10 at once, then they replenish at 1 request per second after that."
这篇关于限制Google Analytics异步事件推送?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!