简体   繁体   English

适用于Android v2的Google Analytics(分析):发送期

[英]Google Analytics for Android v2: dispatch period

I was wondering about dispatch while implementing the new v2 of Google Analytics for my Android app. 我在为Android应用程序实施新版Google Analytics(分析)v2时想知道调度问题。

If the default period is 30 minutes, and the data needs to be reported in like 24 hours or the data will not be processed, how do apps fare when they are only used like 2 times a week and for a duration of like 5 minutes? 如果默认期限为30分钟,并且数据需要在24小时内报告,否则数据将不会被处理,那么当应用程序每周仅使用2次且持续5分钟左右时,应用程序如何收费?

From what I have read I can't seem to find that the app will be staying in the background waiting till the time is up and start submitting? 从我所阅读的内容中,我似乎找不到应用程序会一直在后台等待,直到时间到了再开始提交? Any insights? 有什么见解吗? Otherwise I'll have to switch to manual dispatch. 否则,我将不得不切换到手动调度。

I had the same question (though with the v1 GA, I think the issue is the same). 我有相同的问题(尽管使用v1 GA,但我认为问题是相同的)。

I chose to make the dispatch explicit. 我选择使调度明确。 I try and use the same scale timeout to trigger the dispatch in the background (every 30 minutes), but I do a dispatch on certain events (like start and suspend, and when the app user hits certain internal milestones). 我尝试并使用相同的比例超时来在后台(每30分钟)触发一次调度,但是我对某些事件(例如启动和暂停以及应用程序用户达到某些内部里程碑时)进行调度。 Note that I just went with this for the same reasons you're thinking. 请注意,出于您考虑的相同原因,我只是这样做了。 I didn't find anything more definitive or do any tests that verified the behavior ... 我没有发现任何更确定的东西,也没有进行任何验证行为的测试...

An additional reason to do this to have a bit more control over the thread that is issuing the dispatch call (instead of just triggering as a side-effect of whichever thread is pushing some new stats into GA). 这样做的另一个原因是对发出调度调用的线程有更多的控制权(而不是仅仅因为任何线程将某些新统计信息推入GA的副作用而触发)。

I don't think there is a 24h timeout on data stored locally that hasn't been pushed. 我不认为尚未推送的本地存储数据有24小时超时。 In fact, I thought the problem was that data would get timestamped with its push time, not its actually recording time. 事实上,我认为问题是数据会得到其推送时间,而不是它的实际记录时间的时间戳。 But I'm not confident about this either way ... 但是我对这两种方式都没有信心...

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM