Automatic data collection

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

Native data
Description
Default collection status

Device Model

The user's device model information

false

Installation ID

The installation identifier

true

Session ID

The user's session identifier

true

Custom User ID

The user's custom identifier

true

API Level

The Batch SDK api level

true

Messaging API Level

The Batch SDK Messaging api level

true

Device Language

The user's device language

true

Device Region

The user's device region

true

Device Timezone

The user's device timezone

true

OS Version

The user's device iOS version

true

App Version (String)

The application version (string)

true

App Version (Build Number)

The application version (number)

true

Bundle Name

The application bundle identifier

true

Device Date

The current device date

true

Device Installation Date

The Batch installation date

true

Bridge Version

Version of the batch bridge (for cross-platform plugin only)

true

Plugin Version

Version of the batch plugin (for cross-platform plugin only)

true

GeoIP

Whether Batch should resolve the user's location from ip address

false

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:

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

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

Last updated

Was this helpful?