简体   繁体   English

如何在Google Analytics(分析)Android SDK V2中重新启动会话/处理限制?

[英]How to restart session/handle throttling in Google Analytics Android SDK V2?

I'd like to manually restart some sessions in the Android SDK so I can simulate some data in the Google Analytics framework. 我想手动重新启动Android SDK中的某些会话,以便可以在Google Analytics(分析)框架中模拟一些数据。 According to the sessions documentation and the tracker documenation, it looks like all you have to do is: 根据会议文档和跟踪器文档,看起来您所要做的就是:

for(i=0; i<1000; i++) {
    myTracker.setSession(true);
    myTracker.sendEvent("this", "is a", "test", 1); // this is the first event in the session
}

But when I look at my report, there are ~150 events in the dashboard (that eventually show up after 30 minutes or so). 但是,当我查看报告时,仪表板上有约150个事件(这些事件最终会在30分钟左右出现)。 I'm not sure if I'm being throttled or if this method does not completely restart the session. 我不确定是否受到限制,或者此方法是否无法完全重新启动会话。 Any ideas on how to best do this without restarting the app 1000 times? 关于如何最好地做到这一点的任何想法,而无需重新启动应用程序1000次?

There are two different issues at play : sessions and throttling. 有两个不同的问题在起作用:会话和节流。

Unfortunately, manually resetting the session (which you are doing here) does not affect throttling. 不幸的是,手动重置会话(您在此处进行的操作)不会影响限制。 So despite your new sessions, the number of hits to the server is capped at 10 per second per user. 因此,尽管您进行了新的会话,但对服务器的命中次数上限为每位用户每秒10次。

See: Consecutive GA hits being dropped 另请: 连续GA匹配被删除

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 适用于Android v2的Google Analytics(分析)SDK - Google Analytics SDK for Android v2 如何实现Google Analytics(分析)SDK Android V2 - How to implement google analytics sdk android v2 适用于Android v2(测试版)的Google Analytics(分析)SDK手动发送 - Google Analytics SDK for Android v2 (Beta) Manual Dispatch 适用于Android EasyTracker的Google Analytics V2 SDK会出错 - Google Analytics V2 SDK for Android EasyTracker giving errors Google Analytics SDK for Android v2(测试版)setCustomVar() - Google Analytics SDK for Android v2 (Beta) setCustomVar() 如何在没有EasyTracker的情况下停止Google移动分析v2中的会话 - How to stop a session in Google mobile analytics v2 for android without EasyTracker 适用于Android v2的Google Analytics(分析):发送期 - Google Analytics for Android v2: dispatch period 如何使用Android Google Map sdk v2绘制虚线折线? - How to draw dashed polyline with android google map sdk v2? 适用于Android应用的Google Analytics SDK V2:新用户,回访用户,活跃用户,会话让我感到困惑 - Google Analytics SDK V2 for Android App: New users, returning users, active users, sessions are confusing me Android Google Analytics v2无需使用EasyTracker即可手动管理会话 - Android Google Analytics v2 manually manage session without using EasyTracker
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM