Automatic data collection

By default, the Batch SDK will automatically collect some data related to the user's device:

Native dataDescriptionDefault collection status
Device ModelThe user's device model informationfalse
Device BrandThe user's device brand informationfalse
Installation IDThe installation identifiertrue
Session IDThe user's session identifiertrue
Custom User IDThe user's custom identifiertrue
API LevelThe Batch SDK api leveltrue
Messaging API LevelThe Batch SDK Messaging api leveltrue
Device LanguageThe user's device languagetrue
Device RegionThe user's device regiontrue
Device TimezoneThe user's device timezonetrue
OS VersionThe Android versiontrue
App Version (String)The application version (string)true
App Version (Build Number)The application version (number)true
Bundle NameThe application package nametrue
Device DateThe current device datetrue
First Installation DateThe date at which the app was last updated.true
Last Installation DateThe date at which the app was first installedtrue
Device Installation DateThe Batch installation datetrue
SDK LevelThe Android API leveltrue
Bridge VersionVersion of the batch bridge (for cross-plateform plugin only)true
Plugin VersionVersion of the batch plugin (for cross-plateform plugin only)true
GeoIPWhether Batch should resolve the user's location from ip addressfalse

Some of this data are disabled by default and can be toggled on/off according to the user consent:

  • Device model
  • Device brand
  • GeoIP

Use the following API to fine-tune what you want to enable:

  • Kotlin
  • Java
Batch.updateAutomaticDataCollection {
  it.apply {
    setGeoIPEnabled(true) // Enable GeoIP resolution on server side
    setDeviceBrandEnabled(true) // Enable automatic collection of the device brand information
    setDeviceModelEnabled(true) // Enable automatic collection of the device model information
  }
}

Note: This API can be used at any time in your application lifecycle and Batch will remember these values, even if your Application reboots.