Data Collection

Types of data collected by the SDK.

Data collection can be disabled at the SDK level to prevent the collection of any data (with the exception of the data collection opt-in status). Disabling data collection disables all features of the SDK.

Data collected in the SDK

 Note

The data collected in the SDK is not used to track users across apps.

Any feature enabled

If any feature is enabled, the SDK will collect and send the following data:

  • Channel ID
  • Locale
  • TimeZone
  • Platform
  • Opt in state (push and notifications)
  • SDK version
  • Accengage Device ID (Accengage module for migration)

In-app automation enabled

In addition to the default data collection when any feature is enabled, In-App Automation will also collect:

  • App Version (App update triggers)

Message center enabled

In addition to the default data collection when any feature is enabled, Message Center will also collect:

  • Message Center User
  • Message Reads & Deletes

Push enabled

In addition to the default data collection when any feature is enabled, push will also collect:

  • Push tokens

Chat enabled

In addition to the default data collection when any feature is enabled, Airship Chat will also collect:

  • User messages

Analytics enabled

In addition to the default data collection when any feature is enabled, analytics will also collect:

  • Events
  • Associated Identifiers
  • Registered Notification Types
  • Time in app
  • App Version
  • Device model
  • Device manufacturer
  • OS version
  • Carrier
  • Connection type
  • Framework usage

Tags and attributes enabled

In addition to the default data collection when any feature is enabled, tags and attributes will also collect:

  • Channel and Contact Tags
  • Channel and Contact Attributes

Contacts enabled

In addition to the default data collection when any feature is enabled, contacts will also collect:

  • External ids (named user)

Location enabled

In addition to the default data collection when any feature is enabled, location will also collect:

  • Location permissions
  • Collect location for the app (Airship no longer supports uploading location as events)

All SDK featues are enabled by default, but individual features can be enabled or disabled by using the Privacy Manager. The privacy manager can also be used to completely opt out of SDK functionality, or to initially run the SDK in an opted-out state. If all features are disabled the SDK will not make any network requests or collect data, and will effectively no-op. Data collection can also be enabled or disabled on a per-module basis.

 Note

The privacy manager is available in iOS SDK 14.5 and above.

Configuring default enabled features

Default enabled features can be declared in UAConfig or AirshpConfig.plist by setting the enabledFeatures flag. For instance, to default to just push:

UAConfig
  let config = UAConfig.defaultConfig
  config.enabledFeatures = [.push]
  UAConfig *config = [UAConfig defaultConfig];
  config.enabledFeatures = UAFeaturesPush;
AirshipConfig.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  ...
  <key>enabledFeatures</key>
  <array/>
    <string>push</string>
  </array>
  ...
</dict>
</plist>

To fully disable data collection by default, just set the enabled features in your config to [] in Swift, or UAFeaturesNone in Objective-C:

UAConfig
  let config = UAConfig.defaultConfig
  config.enabledFeatures = []
  UAConfig *config = [UAConfig defaultConfig];
  config.enabledFeatures = UAFeaturesNone;
AirshipConfig.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  ...
  <key>enabledFeatures</key>
  <array/>
    <string>none</string>
  </array>
  ...
</dict>
</plist>

Enabling features at runtime

To enable full Airship functionality at runtime, make the following call:

Enabling all features
  UAirship.shared().privacyManager.enable(.all)
  [[UAirship shared].privacyManager enableFeatures:UAFeaturesAll];

To enable individual features, provide the associated option as shown below:

Enabling Push
  UAirship.shared().privacyManager.enable(.push)
  [[UAirship shared].privacyManager enableFeatures:UAFeaturesPush];
Enabling Message Center
  UAirship.shared().privacyManager.enable(.messageCenter)
  [[UAirship shared].privacyManager enableFeatures:UAFeaturesMessageCenter];
Enabling Analytics
  UAirship.shared().privacyManager.enable(.analytics)
  [[UAirship shared].privacyManager enableFeatures:UAFeaturesAnalytics];
Enabling In-App Automation
  UAirship.shared().privacyManager.enable(.inAppAutomation)
  [[UAirship shared].privacyManager enableFeatures:UAFeaturesInAppAutomation];
Enabling Chat
  UAirship.shared().privacyManager.enable(.chat)
  [[UAirship shared].privacyManager enableFeatures:UAFeaturesChat];
Enabling Tags and Attributes
  UAirship.shared().privacyManager.enable(.tagsAndAttributes)
  [[UAirship shared].privacyManager enableFeatures:UAFeaturesTagsAndAttributes];
Enabling Contacts
  UAirship.shared().privacyManager.enable(.contacts)
  [[UAirship shared].privacyManager enableFeatures:UAFeaturesContacts];
Enabling Location
  UAirship.shared().privacyManager.enable(.location)
  [[UAirship shared].privacyManager enableFeatures:UAFeaturesLocation];

You can also enable combinations of features by combining or bitmasking options. For instance, to enable both push and message center:

Enabling a subset of features
  UAirship.shared().privacyManager.enable([.push, .messageCenter])
  [[UAirship shared].privacyManager enableFeatures:UAFeaturesPush | UAFeaturesMessageCenter];