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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With