简体   繁体   中英

How does Google Analytics for Android handle offline app usage?

I'm currently implementing Google Analytics into my app. The documentation says nothing about how tracking is handled when the user has no internet connection. Does the data get tossed or is it stored somewhere for later upload?

It's not explicitly stated in the SDK documentation, as far as I can tell, but it implies that it stores the hits and waits until the user is online again to send them.

From the Android SDK Documentation :

Known Issues

- Possible inaccurate timestamps: timestamps are recorded at the time the application dispatches to Google Analytics, so if a user experiences long periods of offline use, the timestamps may not be 100% accurate.

Yes, but it seems there is a caveat to be aware of...

Analytics records a Queue_Time parameter which you can use to calculate the "real" time of the event (as opposed to the "upload" time"). However the documentation implies that not all offline events will actually be sent if the user is offline for a long time:

Queue_Time

Used to collect offline / latent hits. The value represents the time delta (in milliseconds) between when the hit being reported occurred and the time the hit was sent. The value must be greater than or equal to 0. Values greater than four hours may lead to hits not being processed.

https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#qt

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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