Understanding the install lifecycle
Batch registers an anonymous install for:
- Every user of your app, the first time Batch SDK starts. This usually happens when they open the app for the first time after Batch integration.
Every install has an anonymous installation ID that identifies it on Batch servers. All the data collected from your app or your website is attached to the install. Please note Batch manages every platform separately. When a user starts the app for the first time on Android, the install will only be registered for your Android app.
If users reinstall the app or clear the website data, a new anonymous install will be registered, that won't be attached to the previous one. Bath will start collecting install data from scratch for that new install.
Here is how the whole install lifecycle looks like:
Let's focus on specific steps on that lifecycle:
New install registration
During the integration of the SDK, you created one app per OS or a website on Batch dashboard. Every app/website has a unique key called the "API key" that identifies it on Batch servers. You can find it in Batch dashboard → Settings → General:
- If your users visit your website from the same computer, using different web browsers (e.g. Chrome, then Firefox, then Microsoft Edge), Batch will consider every browser as different anonymous installs.
- Batch will register a new anonymous install if users reinstall the app or clear your website data from their web browser. Native and custom install data will be collected from scratch.
Native and custom install data collection
All the data coming from the SDK will be attached to the same install until users reinstall the app or clear your website data from their browser.
For every install, Batch can collect:
- Native data: All the data collected by default by the SDK (e.g. push token, country, language, app version, and more). You will find a list of the data collected by the SDK here.
- Custom user ID (optional): Batch allows you to attach a custom user id to the install, that identifies a customer on your end. That user ID is usually sent to Batch when users log into the app and detached when they log out.
- Custom data (optional): On iOS and Android, you can collect user attributes (e.g. subscription date, favorite sports, etc) or track user actions (e.g. read article, visited page, etc), called "events".
Most of the native data is updated every time the SDK starts. Batch SDK cannot track changes that happen outside of the app or while the app is closed.
Native and custom data are not shared across devices. They are only collected at the install level. Data will not be restored if users reinstall the app or install it on another device/platform.