---
title: Airship
slug: experience/airship
description: Learn about Airship's official websites and developer integrations for Android and iOS in this document. Get insights into the event support matrix and the structure of the tracking_config.json file. Discover event configurations for actions, views, purch
docTags: 
createdAt: 2023-06-30T14:25:52.748Z
---

# Summary

## Official websites

| **Site**      | **URL**                                               |
| ------------- | ----------------------------------------------------- |
| Website       | [https://www.airship.com](https://www.airship.com)    |
| Documentation | [https://docs.airship.com](https://docs.airship.com/) |

## Developer integrations

| **Platform** | **URL**                                                                                            |
| ------------ | -------------------------------------------------------------------------------------------------- |
| Android      | [https://github.com/urbanairship/android-library](https://github.com/urbanairship/android-library) |
| iOS          | [https://github.com/urbanairship/ios-library](https://github.com/urbanairship/ios-library)         |
| Web          | <font color="#ff6900">not supported by Purple</font>                                               |

# Tracking service

## Event support matrix

Overview of the supported events and their configuration.

|                                                                        | **Templates**                         | **Parameter**                              |
| ---------------------------------------------------------------------- | ------------------------------------- | ------------------------------------------ |
| <font color="#2166ae">**Actions**</font><font color="#9900ef">*</font> | <font color="#3b9f0f">*action*</font> | <font color="#3b9f0f">supported</font>     |
| <font color="#2166ae">**Views**</font><font color="#9900ef">*</font>   | <font color="#3b9f0f">*name*</font>   | <font color="#ff6900">not supported</font> |
| <font color="#2166ae">**Purchases**</font>                             | <font color="#3b9f0f">*action*</font> | <font color="#3b9f0f">supported</font>     |
| <font color="#2166ae">**Attributes**</font>                            | <font color="#3b9f0f">*name*</font>   | <font color="#ff6900">not supported</font> |

<font color="#9900ef">(*)</font> <font color="#2166ae">**Actions**</font> and <font color="#2166ae">**Views**</font> contains special handling regarding view tracking. More detailed information can be found below in the description of the event configuration for actions and views.

## General structure in tracking\_config.json

:::hint{type="info"}
Tracking service key name in "*tracking\_config.json*" is:
"<font color="#2166ae">**airship**</font>"
:::

:::CodeblockTabs
General structure

```json
{
  
  "airship": {
    "eventsEnabledByDefault": true,
    "viewsEnabledByDefault": true,
    "purchasesEnabledByDefault": true,
    "attributesEnabledByDefault": true,
    
    "events": {
      // your configured list of events
    },
    
    "views": {
      // your configured list of events
    },
    
    "purchases": {
      // your configured list of events
    },
    
    "attributes": {
      // your configured list of attributes
    } 
    
  }
  
}
```
:::

## Event configuration

### Actions

Airship supports action events.&#x20;

:::CodeblockTabs
Action event

```json
"action_event_key": {
  "templates": {
    "action": "value of template"
  },
  "parameters": {
    "parameter_key_1": "value of parameter",

    // your configured list of parameters
  }
}
```

Example

```json
"ISSUE_DOWNLOADED": {
  "templates": {
    "action": "issue_downloaded"
  },
  "parameters": {
    "issue_id": "{{ISSUE_ID}}",
    "issue_name": "{{ISSUE_NAME}}",
    "issue_categories": "{{ISSUE_CATEGORIES}}",
    "issue_tags": "{{ISSUE_TAGS}}",
    "issue_purchasable": "{{ISSUE_PURCHASABLE}}",
    "issue_purchased": "{{ISSUE_PURCHASED}}",
    "publication_id": "{{PUBLICATION_ID}}",
    "publication_name": "{{PUBLICATION_NAME}}"
  }
}
```
:::

**Airships special behavior for view tracking**

On each action event the last memorized view name is put as an additional property as follows:

| **Property key**                        | **Property value**                                                                                   |
| --------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| <font color="#3b9f0f">***view***</font> | The last memorized view name. If no view event was tracked yet, this additional property is omitted. |

### Views

Airship supports view events.

:::CodeblockTabs
View event

```json
"view_event_key": {
  "templates": {
    "name": "value of template"
  }
}
```

Example

```json
"STOREFRONT_FEED": {
  "templates": {
    "name": "feed"
  }
}
```
:::

**Airships special behavior for view tracking**

View tracking needs to be supported in a special way compared to other tracking systems. This special behavior consists of three points:

(1) Each view event needs to be tracked as regular view event.

(2) Together with the view event an aditional custom event must be sent. This custom event has the following structure:

| **Custom event**                                  | ****                                               |
| ------------------------------------------------- | -------------------------------------------------- |
| <font color="#3b9f0f">***"View entered"***</font> | The value can not be changed by any configuration. |

The view itself is tracked as a property:

| **Property key**                        | **Property value**                                                 |
| --------------------------------------- | ------------------------------------------------------------------ |
| <font color="#3b9f0f">***view***</font> | Name of the current view, the same name as the regular view event. |

(3) Memorize the last tracked view.&#x20;

### Purchases

Airship supports purchase events.

:::CodeblockTabs
Purchase event

```json
"purchase_event_key": {
  "templates": {
    "name": "value of template"
  },
  "parameters": {
    "parameter_key_1": "value of parameter",
        
    // your configured list of parameters
  }
}
```

Example

```json
"STOREFRONT_ISSUE_PURCHASED": {
  "templates": {
    "action": "issue_purchased"
  },
  "parameters": {
      "transaction_id": "{{TRANSACTION_ID}}",
      "issue_product_id": "{{PRODUCT_ID}}",
      "issue_price": "{{PRICE}}",
      "issue_price_currency": "{{CURRENCY_CODE}}",
      "issue_id": "{{ISSUE_ID}}",
      "issue_name": "{{ISSUE_NAME}}",
      "issue_type": "{{ISSUE_TYPE}}",
      "issue_categories": "{{ISSUE_CATEGORIES}}",
      "issue_tags": "{{ISSUE_TAGS}}",
      "issue_price_formatted": "{{ISSUE_PRICE}}",
      "issue_latest": "{{ISSUE_LATEST}}",
      "publication_id": "{{PUBLICATION_ID}}",
      "publication_name": "{{PUBLICATION_NAME}}",
      "publication_type": "{{PUBLICATION_TYPE}}"
  }
}
```
:::

### Attributes

Airship supports attributes.&#x20;

:::CodeblockTabs
Attribute

```json
"attribute_key": {
  "templates": {
    "name": "value of template"
  },
 
  // for boolean attributes a "tag_group" is needed   
  "parameters": {
    "tag_group": "name of tag group"
  }
}
```

Example

```json
"HAS_ACTIVE_SUBSCRIPTION": {
  "templates": {
    "name": "has_active_subscription"
  },
  "parameters": {
    "tag_group": "subscriptions"
  }
}
```
:::

**Boolean value attributes**

Attributes with boolean values are mapped to tags on the contact in Airship. The tracking config needs to have a parameter "<font color="#2166ae">**tag_group**</font>". Setting the value to <font color="#3b9f0f">false</font> causes the tag to be removed.

**Other value attributes**

Other value types (string, number, etc.) are mapped to attributes on the contact.

## Additional supported functionality

### Audience management (contact)

[https://docs.airship.com/platform/mobile/audience/#contacts](https://docs.airship.com/platform/mobile/audience/#contacts)

A contact is initialized during app start. Purple's generated device id is used for that.&#x20;

### In-app automation

[https://docs.airship.com/platform/mobile/in-app/getting-started](https://docs.airship.com/platform/mobile/in-app/getting-started/)

This feature is enabled as provided by Airship.

### Message center

[https://docs.airship.com/platform/mobile/message-center/message-center](https://docs.airship.com/platform/mobile/message-center/message-center/)

Airship can display in-app messages. Purple implements this feature by using the default Message-Center-UI provided by Airship. To enhance this feature two action URLs are provided by Purple:

| **Action URL**                                                                                             | **Description**                                                                         |
| ---------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
| <font color="#2166ae">**purple://app/airship/messages/all**</font>                                         | Open the message center.                                                                |
| <font color="#2166ae">**purple://app/airship/messages/**</font><font color="#3b9f0f">**&lt;ID&gt;**</font> | Open a specific message.<br /><font color="#3b9f0f">**ID**
</font>The message id value. |

These action URLs are filtered from the app menu when Airship is not enabled.

### Push

[https://docs.airship.com/platform/mobile/push/getting-started](https://docs.airship.com/platform/mobile/push/getting-started/)

This feature is enabled as provided by Airship.

# How to configure

## Native Purple App

Any native Tracking Service is configured in the <font color="#2166ae">**Purple Manager.**</font>

### Enable SDK

:::hint{type="info"}
***Settings location***

"<font color="#2166ae">**Your app**</font>" => "<font color="#2166ae">**Consent/Push/Analytics**</font>" => "<font color="#2166ae">**Analytics (General/iOS/Android/Web)**</font>"
:::

| **Setting**        | **Description**                                                                                                                     |
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------- |
| **Enable Airship** | To enable the Airship SDK in your app, activate this checkbox.                                                                      |
| **App key**        | The app key provided by Airship.                                                                                                    |
| **App secret**     | The app secret provided by Airship.                                                                                                 |
| **Site**           | The site location. <br />*Selectable values are:*<br /><font color="#3b9f0f">**US**</font><br /><font color="#3b9f0f">**EU**</font> |

### Apple privacy / ATT

:::hint{type="info"}
***Settings location***

"<font color="#2166ae">**Your app**</font>" => "<font color="#2166ae">**Consent/Push/Analytics**</font>" => "<font color="#2166ae">**Privacy**</font>"
:::

### Consent management

:::hint{type="info"}
**Settings location:**

"<font color="#2166ae">**Your app**</font>" => "<font color="#2166ae">**Consent/Push/Analytics**</font>" => "<font color="#2166ae">**Consent Management**</font>"
:::

| **Setting**               | **Description**                                               |
| ------------------------- | ------------------------------------------------------------- |
| **Vendor-ID for Airship** | The Vendor-ID is provided by the consent management platform. |

## Web integration

Purple does not support Airship web integration.
