What happens with iphone google analytics calls wh

2019-03-18 07:38发布

Hey Fellow Developers! I'm doing a little research about Analytics products for iphone apps. I came across google analytics which seems pretty good. Somehow I'm not finding lot's of documentation about it. Basically my concern is:

What happens to a trackPageview or event tracking call when there's no Internet connection? Are these method calls persisted for future dispatch when there's a connection available or do they generate an error and that's it?

Thank you in advance for your help!

3条回答
放荡不羁爱自由
2楼-- · 2019-03-18 08:10

The GA SDK has batching possibility, which is als recommended to use.

"To save on connection and battery overhead, we recommend batching your tracking requests. You can call dispatch on the tracking object any time you want to make a batch request, and you can do this either manually or at specific time intervals."

http://code.google.com/intl/de-DE/mobile/analytics/docs/iphone/

查看更多
3楼-- · 2019-03-18 08:12

According to Google. Their documentation says

If a user loses network access or quits your app while there are still hits waiting to be dispatched, those hits are persisted in local storage. They will be dispatched the next time your app is running and dispatch is called.

You can read more about how disptaching takes place at: https://developers.google.com/analytics/devguides/collection/ios/v2/dispatch

查看更多
该账号已被封号
4楼-- · 2019-03-18 08:14

Some of the other services out there are very robust with their batching. Localytics (www.localytics.com) has a free library which is open source so you can see how they batch. If the connection isn't available then the data is stored on the device until the next session when there is a connection.

-- Henry

查看更多
登录 后发表回答