Data Collection

Types of data collected by the SDK

You can disable data collection by default and require your users to opt in to data collection to register and receive notifications.

The SDK includes settings to disable both Analytics and Data Collection. Disabling analytics prevents the system from gathering event information from your user, but still allows registrations, attributes, etc.

Disabling data collection prevents new registrations.

 Note

Airship does not collect browser cookies regardless of analytics or data collection settings.

InformationWith Analytics DisabledWith Data Collection Disabled
Direct engagement (clicks)
Session
Custom Events
Screen View Events
In-App Experience (SceneA single or multi-screen in-app experience cached on users’ devices and displayed when users meet certain conditions in your app or website, such as viewing a particular screen or when a Custom Event occurs. They can be presented in fullscreen, modal, or embedded format using the default swipe/click mode or as a Story. Scenes can also contain survey questions.) Events
Browser Cookies
Attributes
Tags
Subscription Lists
Named User
Registration
Opt-out
 Important

You are responsible for informing your end users about data collection, and collecting consent from the End User. The Airship SDK will perform data collection as described in this document on the signals provided by your integration, and you must collect the appropriate consent prior to using SDK features that perform data collection.

When we collect data

The Airship SDK will not send any data to the Airship platform until a channel is created, which will occur via one of the following methods:

  • Creating a channel via sdk.create
  • Registering for push notifications via sdk.register
  • Registering an email, sms, or open channel via the Contact interface
  • Associating an exiting channel via the Contact interface
  • Using a plugin for performing registration of a channel or associated channel

Prior to those actions, the SDK may store data within the browser should you perform certain actions like setting tags or attributes on a channel or contact, but these values will not be sent to Airship until a channel is created.

 Important

Performing any action that results in data collection will count the browser profile as a Monthly Unique Visitor for that month, and any subsequent visits from that browser profile will count in the month the visit occurred.

Disable data collection by default

You can require users to give consent (opt in) before collecting any data about them. When dataCollectionOptInEnabled is true, Airship will not collect data about users who are not opted in. Adding this setting to your push worker and snippet configurations does not affect currently registered users.

Require Users to Opt In before Collecting Data
...
  'UA', {
    vapidPublicKey: 'vapidPublicKey',
    appKey: 'appKey',
    token: 'token',
    dataCollectionOptInEnabled: true // add this!
});

Opting in to data collection

You can restore Airship functionality by opting back into data collection. Set to false to disable data collection.

Enable data collection for the audience
const sdk = await UA
await sdk.setDataCollectionEnabled(true)

You can check if data collection is enabled with the following:

const sdk = await UA
const enabled = await sdk.isDataCollectionEnabled()

Opting out of data collection

Opting a user out of data collection will also opt them out of notifications.

const sdk = await UA
await sdk.setDataCollectionEnabled(false)