Mobile app data collection

Instead of using JavaScript to collect data as you do on a website, you'll use an SDK, or Software Development Kit, to collect data from your mobile app. There are different SDKs for different operating systems, including Android and iOS.

SDKs collect data about your app, for example what users look at, the device operating system, and how often a user opens the app. This data gets packaged as hits, and sent to your Analytics account. This is similar to how the JavaScript code sends hits from a website.

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.