简体   繁体   English

iOS上的Flurry / Google Analytics(分析)/ Localytics带宽消耗

[英]Flurry / Google Analytics / Localytics bandwidth consumption on iOS

I'm choosing an analytics service for my iOS app. 我正在为我的iOS应用选择分析服务。 I want to track quite a lot of events and the app I'm developing is going to be used outdoors, so there will be no wi-fi connection available, and even the cellular connectivity can be of a poor quality. 我想跟踪很多事件,并且我正在开发的应用程序将在户外使用,因此将没有可用的wi-fi连接,甚至蜂窝连接的质量也可能很差。

Analytics is the only thing that requires network connectivity in my app. Analytics(分析)是唯一需要我的应用程式具备网路连线功能的功能。 Recently I've checked how much traffic it consumes, and it consumes much more than I've expected. 最近,我检查了它消耗了多少流量,并且消耗的流量比我预期的要多得多。 That was about 500KB for Google Analytics and about 2MB for Flurry, and that's just for a 2-minute long session with a few hundred events. 对于Google Analytics(分析)来说,这大约是500KB,对于Flurry,则大约是2MB,这是一个长达2分钟的会话,其中包含数百个事件。 It seems very inefficient to me. 对我来说似乎效率很低。 (Flurry logs a little bit more parameters, but definitely not 4 times more.) (Flurry记录了更多的参数,但绝对不是4倍。)

I wonder — have anybody compared other popular analytics solutions for their bandwidth consumption? 我想知道-是否有人将其他流行的分析解决方案的带宽消耗进行了比较? Which one is the slimmest one? 哪一个是最薄的?

Thank you 谢谢

If you don't need real time data (and you probably don't with outdoor app), you can get the best network compression for Analytics by dispatching more hits at once to benefit from batching and compression. 如果您不需要实时数据(并且可能不需要户外应用程序),则可以一次分发更多的匹配数据,从而从批处理和压缩中受益,从而获得Analytics(分析)的最佳网络压缩。 To do that set the dispatch interval to 30 minutes. 为此,将调度间隔设置为30分钟。 The maximum size of uncompressed hit that analytics will accept is about 8k so you should be sending less then that. 分析将接受的未压缩匹配的最大大小约为8000k,因此您应该发送的大小要少于该值。 With compression that would bring it down to ~25% of the original size for individual hit assuming mostly ascii data. 压缩后,假设主要是ascii数据,单个击中的压缩率将降低到原始大小的〜25%。 To generate 500k of data you should be sending few hundred hits individually. 要生成500k的数据,您应该分别发送几百次匹配。 With batching and compression the hits will shrink down more efficiently. 通过批量和压缩,命中将更有效地缩小。 Usually batch of 20 hits will compress to less then 10% of the uncompressed size or about 800 bytes per hit at most. 通常,每20个匹配的压缩量将压缩到未压缩大小的10%以下,或者每个匹配最多压缩800个字节。 For further network savings just send less data per event or fewer events. 为了进一步节省网络,每个事件发送更少的数据或更少的事件。 Btw, Analytics has a rate limit of 60 tokens that are replenished at a rate of 1 hit every 2 seconds. 顺便说一句,Analytics(分析)的速率限制为60个令牌,每2秒以1次命中的速率进行补充。 If you are sending few hundred events in short period of time your data is likely getting rate limited. 如果您要在短时间内发送数百个事件,则数据可能会受到速率的限制。

https://developers.google.com/analytics/devguides/collection/ios/limits-quotas#ios_sdk https://developers.google.com/analytics/devguides/collection/ios/limits-quotas#ios_sdk

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

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