Limit on Google Analytics asynchronous event push?

匆匆过客 提交于 2019-12-01 10:17:16

问题


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?


回答1:


Got an answer from Google directly:

"you can send 10 at once, then they replenish at 1 request per second after that."



来源:https://stackoverflow.com/questions/11474600/limit-on-google-analytics-asynchronous-event-push

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!