Data Collection

Types of data collected by the Web SDK

Privacy Manager

 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 the Airship SDK is loaded, either by inclusion of the snippet or import into a registered service worker, it will create databases and utility records in the browser. While these are non-identifying, if you require consent before any operation is performed, do not load the Airship SDK onto your pages until you have collected that consent.

Data collected by the Airship SDK can be controlled using Privacy Manager flags. Each flag enables additional Airship features within the SDK and controls what data is collected. The flags are for individual or groups of functional features within the SDK. Some Airship features, such as contact tags, require enabling multiple flags.

Privacy Manager FlagFeatures
PushPush notifications
In-App AutomationScenes
Tags and AttributesTags, Attributes, and Subscription Lists
ContactsContact Tags, Attributes, and Subscription Lists; Named User; and Associated Channels
AnalyticsAssociated identifiers, Custom events, Screen tracking, Surveys (questions and NPS surveys in ScenesA 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.), email address (by using form inputs in Scenes), Feature FlagAn experimentation tool for controlling the availability of content or functionality in your app or website. A flag’s Configurations determine the audience, schedule, and property values to apply when the flag is enabled. Flag properties enable making immediate code updates, bypassing the need for traditional code changes and release processes. interaction
Feature FlagsFeature Flag evaluation and interaction

SDK Data Collection

All SDK features are enabled by default, but the SDK can be configured to disable all or a subset of features on start. If the SDK is initialized without any features enabled, it will not make any network requests. If the SDK features are disabled after being previously enabled, it may make a few network requests to opt the channel out to prevent notifications.

 Note

The data collected automatically by the SDK is not used to track users across websites or web applications.

DataDescriptionPrivacy Manager Features
Channel IDAirship browser instance identifierAny
LocaleThe browser’s locale, comprised of language and language countryAny
Time zoneThe device time zoneAny
SDK versionThe Airship SDK versionAny
Notification opt-In statusNotifications and background opt-in statusAny
Contact IDInternal Airship ID that maps to contactContacts
Push SubscriptionThe VAPID push subscription and endpointsPush
Push PlatformThe push delivery vendor, e.g., Google, Mozilla, MicrosoftPush
Browser DetailsThe browser name, version, type (desktop/mobile), and user agentAnalytics
App versionThe app’s version, when provided by the integrationAnalytics, In-App Automation
SessionBrowsing session and associated attribution dataAnalytics
Notification eventsPush notification interaction eventsAnalytics, Push
In-App Automation eventsEvents within an In-App display: displays, resolutions, page views, button taps, and survey resultsAnalytics, In-App Automation

Website Data Collection

In addition to the data automatically collected by the SDK, the website integration can provide data to the SDK for collection:

DataDescriptionPrivacy Manager Features
Channel TagsTags and tag groups set on the channelTags and Attributes
Channel Subscription ListsSubscription Lists set on the channelTags and Attributes
Channel AttributesAttributes set on the channelTags and Attributes
Contact TagsTags and tag groups set on the contactTags and Attributes, Contacts
Contact Subscription ListsSubscription Lists set on the contactTags and Attributes, Contacts
Contact AttributesAttributes set on the contactTags and Attributes, Contacts
Named UserContact’s external IDContacts
Associated ChannelsEmail and email opt-in data, SMS and SMS opt-in data, etc.Contacts
Associated IdentifiersAdditional analytics identifiersAnalytics
Custom EventsWebsite’s custom eventsAnalytics
Screen TrackingWebsite’s screen trackingAnalytics
Permission CollectionAdditional permissions collected by the SDKAnalytics
Feature Flag InteractionEvents related to Feature FlagsAn experimentation tool for controlling the availability of content or functionality in your app or website. A flag’s Configurations determine the audience, schedule, and property values to apply when the flag is enabled. Flag properties enable making immediate code updates, bypassing the need for traditional code changes and release processes.Feature Flags, Analytics

When we collect data

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

  • Creating a channel through sdk.create
  • Registering for push notifications through sdk.register
  • Registering an email, sms, or open channel through the Contact interface
  • Associating an exiting channel through 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, in accordance with enabled Privacy Manager flags, should you perform specific actions like setting tags or attributes on a channel or contact. However, the 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.

Using Privacy Manager

The Privacy Manager allows setting default enabled features as well as modifying the enabled features at runtime. This table provides a mapping of the flags:

Privacy Manager FlagString Value
Pushpush
In-App Automationin_app_automation
Tags and Attributestags_and_attributes
Contactscontacts
Feature Flagsfeature_flags
Analyticsanalytics
Allall

Configuring Default Enabled Features

To configure the default set of enabled features, you must pass an array of enabledFeatures in the configuration options in both your snippet and service worker’s initialization of the Airship SDK:

Configuring Enabled Features
...
  'UA', {
    vapidPublicKey: 'vapidPublicKey',
    appKey: 'appKey',
    token: 'token',
    enabledFeatures: [
      'push',
      'in_app_automation',
      'tags_and_attributes'
    ]
  });

When not provided, all features will be enabled. Passing a list of enabledFeatures only specifies the defaults. You may enable additional features at runtime.

Modifying Enabled Features

Features can be enabled or disabled using the PrivacyManager interface:

Enabling Features
const sdk = await UA
await sdk.privacyManager.enable('push', 'in_app_automation')

Disabling Features
const sdk = await UA
await sdk.privacyManager.disable('push', 'in_app_automation')

Disabled Feature Errors

When attempting to use a feature that is disabled, the SDK will raise errors that detail why the feature could not be used. If you plan to call these APIs when the Privacy Manager-enabled features could be in different states, you must catch these errors if you wish for your code to continue:

Handling Disabled Features
const sdk = await UA

try {
  await sdk.channel.editTags()
    .add("device", "cool_tag")
    .apply()
} catch (e) {
  // handle error as desired
}

Legacy SDK Data Collection Flags

Before the Privacy Manager was implemented for the Airship SDK, there were two exposed controls for data collection. These controls have been mapped to the Privacy Manager, retaining their previous behavior. The flags and APIs discussed below are deprecated and will be removed in the next major version.

Configuration

The following configuration values remain available, and are mapped to the Privacy Manager as follows:

  • disableAnalytics disables the Analytics Privacy Manager flag and disallows it being enabled through the Privacy Manager.
  • dataCollectionOptInEnabled disables all Privacy Manager flags by default and persists that value to the browser upon visit. Individual features may be enabled or disabled through the Privacy Manager.
 Important

It is considered an error to specify enabledFeatures and dataCollectionOptInEnabled simultaneously. Doing so prevents the Airship SDK from initializing.

Runtime

At runtime, we supported disabling data collection and analytics via calls to the Airship SDK. We recommended using the Privacy Manager, and the following describes how they are mapped.

Analytics

Calls to sdk.analytics.setEnabled enable or disable the analytics Privacy Manager feature depending on the value passed to the method.

Disabling Analytics
const sdk = await UA

// legacy call to disable analytics
await sdk.analytics.setEnabled(false)
// equivalent privacy manager call
await sdk.privacyManager.disable('analytics')

Enabling Analytics
const sdk = await UA

// legacy call to enable analytics
await sdk.analytics.setEnabled(true)
// equivalent privacy manager call
await sdk.privacyManager.enable('analytics')

Data Collection

Calls to sdk.setDataCollectionEnabled enable or disable all Privacy Manager features depending on the value passed to the method.

Disabling Data Collection
const sdk = await UA

// legacy call to disable data collection
await sdk.setDataCollectionEnabled(false)
// equivalent privacy manager call
await sdk.privacyManager.disable('all')

Enabling Data Collection
const sdk = await UA

// legacy call to enable data collection
await sdk.setDataCollectionEnabled(true)
// equivalent privacy manager call
await sdk.privacyManager.enable('all')