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
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 user's device iOS versiontrue
App Version (String)The application version (string)true
App Version (Build Number)The application version (number)true
Bundle NameThe application bundle identifiertrue
Device DateThe current device datetrue
Device Installation DateThe Batch installation datetrue
Bridge VersionVersion of the batch bridge (for cross-platform plugin only)true
Plugin VersionVersion of the batch plugin (for cross-platform 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
  • GeoIP

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

  • Swift
  • Objective-C
BatchSDK.updateAutomaticDataCollection { config in
    // Enable GeoIP resolution on server side
    config.setGeoIPEnabled(true)
    // Enable automatic collection of the device model information
    config.setDeviceModelEnabled(true)
}

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