Mobile app data collection
Data from mobile apps is not sent to Analytics right away. When a user navigates through an app, the Analytics SDK stores the hits locally on the device and then sends them to your Analytics account later in a batch process called dispatching. Dispatching is necessary for two reasons:
- Mobile devices can lose network connectivity, and when a device isn’t connected to the web, the SDK can’t send any data hits to Analytics.
- Sending data to Analytics in real time can reduce a device’s battery life.
For these reasons, the SDKs automatically dispatch hits every 30 minutes for Android devices and every two minutes for iOS devices, but you can customize this time frame in your tracking code to control the impact on the battery life.
Another important function of the mobile SDK is differentiating users. When an app launches for the first time the Analytics SDK generates an anonymous unique identifier for the device, similar to the way the website tracking code does. Each unique identifier is also counted in Analytics as a unique user. If the app gets updated to a new version, the identifier on the device remains the same. However, if the app gets uninstalled, the Analytics SDK deletes the identifier. If the app is then reinstalled, a new anonymous identifier is created on the device. The result is that the user will be identified as a new user, not a returning user, but no other data in your Analytics reports will be impacted.