# Analytics & Attribution Analytics and attribution partners integrated with Airship help you measure engagement, evaluate campaign performance, and understand customer behavior across your channels. # Adjust > Set attributes and trigger automations from Adjust. Adjust provides mobile measurement capabilities, helping you learn about your audience. This integration helps you take advantage of your audience data from Adjust in Airship, either to segment your audience or to trigger automated messages. * Set attributes on your Airship audience, using information from Adjust to personalize messages and refine your audience. You must set up attributes in Airship to receive this information before you can set attributes from Adjust. * Send custom events from Adjust into Airship, utilizing your audience information from Adjust to personalize and trigger automations and [Sequences](https://www.airship.com/docs/reference/glossary/#sequence). ## Adjust Integration Requirements * **Accounts** 1. Adjust 1. Airship — Must include messaging * **Airship project** * The Airship SDK must use the same user identity as the Adjust SDK. ## Configuring the Adjust Integration In Airship: 1. Next to your project name, select the dropdown menu (▼), then **Settings**. 1. Under **Project settings**, select **Partner Integrations**. 1. Select **Adjust**. 1. Select **Configure** for the inbound integration and follow the onscreen instructions to: * Create [attributes](https://www.airship.com/docs/reference/glossary/#attribute), [custom events](https://www.airship.com/docs/reference/glossary/#custom_event), and an authentication token for your project. Adjust uses the token to communicate with your project in Airship * Add Airship as a partner in Adjust. ## SDK Setup To use the Adjust integration, you must add Adjust dependencies and associate Airship channel IDs with Adjust's `airship_channel_id` callback parameter. ### Android Setup For more information, see the [Adjust Android SDK Docs](https://github.com/adjust/android_sdk#quick-start-1). 1. **Add dependencies to `build.gradle`** ```gradle implementation 'com.adjust.sdk:adjust-android:4.22.0' implementation 'com.android.installreferrer:installreferrer:1.1.2' ``` 1. **Associate channel IDs with Adjust `airship_channel_id`** ```java String channelId = Airship.getChannel().getId(); Adjust.addSessionPartnerParameter("airship_channel_id", channelId); ``` ### iOS Setup For iOS, you must add the Adjust dependency to your `Podfile` and then associate channel IDs with Adjust's `airship_channel_id` callback parameter. For more information, see the [Adjust iOS SDK Docs](https://github.com/adjust/ios_sdk#basic-integration). **Add dependency to `Podfile`** 1. If this is your first time using CocoaPods, Install CocoaPods using `gem install cocoapods`. Otherwise, continue to Step 3. 1. Run `pod setup` to create a local CocoaPods spec mirror. 1. Create a `Podfile` in your Xcode project directory by running `pod init` in your terminal, edit the `Podfile` generated and add the dependency `pod 'Adjust', '~> 4.22.1'`. 1. Run `pod install` in your Xcode project directory. CocoaPods should download and install the added library, and create a new Xcode workspace. Open up this workspace in Xcode or typing `open *.xcworkspace` in your terminal. **Swift: Associate channel IDs with Adjust `airship_channel_id`** ```swift let channelId = UAirship.channel()?.identifier if (channelId != nil) { Adjust.addSessionPartnerParameter("airship_channel_id", value: channelId!) } ``` **Objective-C: Associate channel IDs with Adjust `airship_channel_id`** ```objc NSString *channelId = [UAirship channel].identifier; [Adjust addSessionPartnerParameter:@"airship_channel_id" value:channelId]; ``` ## List of Attributes Received from Adjust | Attribute Name | Adjust parameter | Attribute ID | Type | |---|---|---|---| | Adjust Device ID | `adid` |`adjust_device_id` | Text | | Adjust Device City | `city` |`adjust_device_city` | Text | | Adjust Device Country Subdivision | `country_subdivision` | `adjust_device_country_subdivision` | Text | | Adjust Device Country Code | `country` | `adjust_device_country_code` | Text | | Adjust Device Currency Code | `currency` | `adjust_currency_code` | Text | | Adjust Device Model Number | `device_name` | `adjust_device_model_number` | Text | | Adjust Google Play Store Store Ad ID MD5 Hash | `gps_adid_md5` | `adjust_gps_ad_id_md5` | Text | | Adjust Google Play Store Ad ID | `gps_adid` | `adjust_gps_ad_id` | Text | | Adjust Device IP Address | `ip_address` | `adjust_device_ip_address` | Text | | Adjust Is Reattributed | `is_reattributed` | `adjust_is_reattributed` | Number1 | | Adjust Device ISP | `isp` | `adjust_device_isp` | Text | | Adjust Device Language Code | `language` | `adjust_device_language_code` | Text | | Adjust Last Session Time in Seconds | `last_time_spent` | `adjust_last_time_spent` | Number | | Adjust Lifetime Session Count | `lifetime_session_count` |`adjust_lifetime_session_count` | Number | | Adjust Attribution Method | `match_type` | `adjust_attribution_method` | Text | | Adjust OAID Device ID MD5 Hash | `oaid_md5` | `adjust_oaid_device_id_md5` | Text | | Adjust OAID Device ID | `oaid` | `adjust_oaid_device_id` | Text | | Adjust Device Postal Code | `postal_code` | `adjust_device_postal_code` | Text | | Adjust Random Device Reference Tag | `reftag` | `adjust_reftag` | Text | | Adjust Device Region Code | `region` | `adjust_device_region_code` | Text | | Adjust Reporting Currency | `reporting_currency` | `adjust_reporting_currency` | Text | | Adjust SDK Version | `sdk_version` | `adjust_sdk_version` | Text | | Adjust Session Count | `session_count` | `adjust_session_count` | Number | | Adjust Current Session Time in Seconds | `time_spent` | `adjust_time_spent` | Number | | Adjust Tracking Enabled | `tracking_enabled` | `adjust_tracking_enabled` | Number1 | | Adjust Tracking Limited | `tracking_limited` | `adjust_tracking_limited` | Number1 | | Adjust Web Unique ID | `web_uuid` | `adjust_web_uuid` | Text | | Adjust Network Name | `network_name` | `adjust_network_name` | Text | | Adjust Campaign Name | `campaign_name` | `adjust_campaign_name` | Text | 1 Value is either 0 (false) or 1 (true/enabled). ### Airship Channel Example with Adjust Attributes Attributes appear in an `attributes` object on the channel. Attributes won't appear on channels until set from Adjust. **Airship channel example** ```json { "channel_id": "516a818b-b57e-4a35-b7ad-41c6ef447364", "device_type": "android", "installed": true, "opt_in": true, "background": true, "push_address": "", "created": "2019-07-31T00:10:34", "last_registration": "2020-08-17T08:11:46", "tags": [], "tag_groups": { "group": [ "tags" ] }, "device_attributes": { "ua_device_os": "10", "ua_country": "US", "ua_device_model": "SM-G973U", "ua_local_tz": "America/Los_Angeles", "ua_app_version": "", "ua_location_settings": "true", "ua_language": "en", "ua_sdk_version": "13.2.0", "ua_carrier": "Verizon " }, "attributes": { "adjust_lifetime_session_count": 45, "adjust_device_postal_code": "97209", "adjust_device_region_code": "US", } } ``` ## Custom Event Properties from Adjust Events from Adjust are of the `Custom` type, with the `body.name` of the event representing the Adjust event type — `install`, `rejected install`, `session`, `in-app event`, `reattribution`, or `rejected reattribution`. Properties from Adjust appear in the `body.properties` object. | Custom Event Property | Description | |---|---| | `adjust_attribution_method` | Attribution method | | `partner_parameters` | Custom partner parameters collected by the Adjust SDK or S2S request and transmitted to third party providers via postbacks | | `reporting_revenue` | Revenue, as reported in the Adjust Dashboard, in whole currency units | | `revenue_float` | Revenue, as sent from Adjust SDK, in whole currency units | | `revenue_usd_cents` | Revenue, in US cents | | `revenue_usd` | Revenue, in US dollars | | `revenue` | Revenue, as sent from Adjust SDK in cents | | `adjust_network_name` | Network name | | `adjust_campaign_name` | Campaign name | **Sample Adjust custom event** ```json { "id": "aae70da5-a276-4dd4-a11e-f5b5796a52f1", "offset": "1000000000780", "occurred": "2020-08-17T22:37:53.000Z", "processed": "2020-08-17T22:40:35.337Z", "device": { "ios_channel": "c014a2ed-4c30-4f6d-a9b3-e2ba7a01b45c", "channel": "c014a2ed-4c30-4f6d-a9b3-e2ba7a01b45c", "device_type": "IOS", "attributes": { "locale_variant": "", "app_version": "1.0", "device_model": "x86_64", "app_package_name": "com.urbanairship.partner.adjust", "iana_timezone": "America/Los_Angeles", "push_opt_in": "false", "locale_country_code": "US", "device_os": "13.0", "locale_timezone": "-25200", "locale_language_code": "en", "location_enabled": "false", "background_push_enabled": "false", "ua_sdk_version": "13.2.0", "location_permission": "UNPROMPTED" } }, "body": { "name": "session", "session_id": "c014a2ed-4c30-4f6d-a9b3-e2ba7a01b45c", "source": "API", "properties": { "adjust_attribution_method": "", "partner_parameters": "", "reporting_revenue": 25, "revenue_float": 25.00, "revenue_usd_cents": 2500, "revenue_usd": 25, "revenue": 2500, "adjust_network_name": "meta", "adjust_campaign_name": "Spring 2020" } }, "type": "CUSTOM" } ``` # Adobe Analytics > Complement your Adobe Analytics data with real-time mobile and web engagement events. ## Overview Adobe Analytics provides behavioral analytics and content performance measurement for websites and mobile apps. Airship [Real-Time Data Streaming](https://www.airship.com/docs/reference/glossary/#rtds) (RTDS) provides a live view into your application, adding the "messaging perspective" to your Adobe Analytics information. This integration enables a complete view of the user experience by combining Adobe Analytics data with user-specific interactions such as push sends, direct and indirect opens, web notification clicks, and uninstalls. Additionally, Airship augments Adobe's device reporting with information on in-app behavior defined by the Airship SDK. Airship events can tell you when a Message Center message was delivered, read, and deleted. They can also describe what happened to an in-app notification — whether it was displayed or expired, and what happened to it after it was displayed. Did the user dismiss it, interact with it, or allow it to resolve itself? --- There are three major steps to setting up this integration. You will need help from your developers (iOS and Android) and your Adobe Analytics and Airship administrators to: 1. **Add client code** (Developers) — This code associates the user IDs between the two systems, tying events captured from the Airship SDK (iOS, Android, or Web) to events captured from the Adobe Analytics SDK. 1. **Configure an outbound integration for Adobe Analytics** (Airship administrator) — The RTDS integration sends Airship events to an Adobe Analytics report suite. 1. **Set up Adobe Analytics processing rules** (Adobe Analytics administrator) — These rules map Airship events to your Adobe variables and events. ## Adobe Analytics Integration Requirements This integration requires these accounts: 1. Adobe Analytics 1. Airship — Must include both: * Messaging * [Real-Time Data Streaming](https://www.airship.com/docs/reference/feature-packages/#data) ## Adding Client Code Fetch the Adobe Analytics visitor ID for your user, then associate it with the Airship [channel](https://www.airship.com/docs/reference/glossary/#channel_term) ID. See [Android](https://www.airship.com/docs/developer/sdk-integration/android/analytics/#associated-identifiers), [iOS](https://www.airship.com/docs/developer/sdk-integration/apple/analytics/#associated-identifiers), and [Web](https://www.airship.com/docs/developer/sdk-integration/web/analytics-and-reporting/#custom-identifiers) custom identifiers documentation. #### iOS Swift ```swift // Get the Adobe visitor ID let visitorID = ADBMobile.visitorMarketingCloudID() // Add the visitor ID to the current associated identifiers let identifiers = Airship.analytics.currentAssociatedDeviceIdentifiers() identifiers.set(identifier: visitorID, key:"AA_visitorID") // Associate the identifiers Airship.analytics.associateDeviceIdentifiers(identifiers) ``` ```obj-c // Get the Adobe visitor ID NSString *visitorID = [ADBMobile visitorMarketingCloudID]; // Add the visitor ID to the current associated identifiers UAAssociatedIdentifiers *identifiers = [UAirship.analytics currentAssociatedDeviceIdentifiers]; [identifiers setIdentifier:visitorID forKey:@"AA_visitorID"]; // Associate the identifiers [UAirship.analytics associateDeviceIdentifiers:identifiers]; ``` #### Android Java ```java // Get the Adobe visitor ID String visitorId = Visitor.getMarketingCloudId(); // Add the visitor ID to the current associated identifiers Airship.getAnalytics() .editAssociatedIdentifiers() .addIdentifier("AA_visitorID", visitorId) .apply(); ``` #### Web The Adobe Experience Cloud Identity Service (ECID) JavaScript library retrieves the visitor ID asynchronously. Initialize both SDKs before associating the identifier. ```javascript const sdk = await UA; // Adobe ECID provides the visitor ID via callback Visitor.getInstance(adobeOrgId).getMarketingCloudVisitorID(async (visitorId) => { if (visitorId) { await sdk.analytics.associatedIdentifiers.edit() .add("AA_visitorID", visitorId) .apply(); } }); ``` > **Note:** The `analytics` feature must be enabled in your Web SDK configuration. This is controlled by the `enabledFeatures` list. Ensure `analytics` is included. See [Data Collection for the Web SDK](https://www.airship.com/docs/developer/sdk-integration/web/data-collection/).

Once set, all associated identifiers are returned in RTDS under the "identifiers" key:

```json { "ios_channel": "a6b392d6-3b0d-4c00-98ef-5cb91d51268a", "named_user_id": "albert", "identifiers": { "foo": "bar", "verycustomid": "123554" }, "attributes": { "package_name": "com.company_name.app_name", "version": "1.0.0", "ua_library": "7.0.2" } } ```

See also: RTDS API: Device Information.

## Configuring the Outbound Integration > **Warning:** Airship sends events to Adobe with timestamps. If your Adobe Analytics Report Suite has timestamps disabled, Adobe will drop Airship events. See [Timestamps Optional](https://docs.adobe.com/content/help/en/analytics/admin/admin-tools/timestamp-optional.html) for more information. You will need your Adobe Analytics Report Suite ID and Tracking Server URL. If you do not have these, contact your iOS, Android, or Web developer. In Airship: 1. Next to your project name, select the dropdown menu (▼), then **Settings**. 1. Under **Project settings**, select **Partner Integrations**. 1. Select **Adobe Analytics**. 1. Select **Configure** for the outbound integration and follow the onscreen instructions to: * Enter your Report Suite ID * Enter your Tracking Server URL * Select the Airship events to send to your Report Suite After configuring your app and your integration, you can create event-based Segments in Adobe Analytics. See [Recommended Attribute Mapping](#connect-aa-mapping) for recommended mapping of Data Streaming events to Adobe Analytics events. ### Recommended Property Mapping {#connect-aa-mapping} > **Important:** If you set up your integration before March 11, 2020, your event fields will not belong to a global `airship` object. You must create a new integration to use the `airship.` namespace. In Adobe Analytics, you capture the data that is valuable to you using context data and processing rules. Airship uses Adobe's [Data Insertion API](https://github.com/AdobeDocs/analytics-1.4-apis/blob/master/docs/data-insertion-api/index.md) to send data to Adobe Analytics. Airship uses the `contextData` field so that you can include every piece of relevant data from an Airship event without consuming the limited number of variables and properties that Adobe Analytics supports. You can set the Adobe Analytics processing rules so that every field in an Airship event maps to an Adobe Analytics concept. After your Adobe Analytics administrator sets up your processing rules, you can view Airship event data in your Adobe Analytics dashboard. We derive `contextData` keys from the original Data Streaming events using JSON notation, and use `airship` to represent the global parent for all Airship event properties. For example, this is the push identifier of a notification that caused an event: ```json { "body": { "triggering_push": { "push_id": "d99bd842-f816-4560-bc59-b057f7c0e164" } } } ``` This field would be available for mapping as `airship.body.triggering_push.push_id`. When mapped to an sProp, eVar, event, or other Adobe Analytics concept, the variable's value would be `d99bd842-f816-4560-bc59-b057f7c0e164`. > **Note:** The above JSON represents a partial event object. Actual JSON objects coming from the > Real-Time Data Streaming API are more complex. To see all the available fields, read the [Data Streaming API Reference](https://www.airship.com/docs/developer/rest-api/connect/). ## Setting Up Adobe Analytics Processing Rules You or your Adobe administrator must set up processing rules in the Adobe Analytics Admin Console to enable Adobe Analytics to capture events from Airship. These processing rules assign `contextData` variables to Adobe Analytics variables or increment events (counters) accordingly. 1. In the Adobe Analytics interface, select **Admin Console** and navigate to **Report Suites**. 1. Select the Report Suite that Airship is sending data to, and then go to **Edit Settings**, then **General**, then **Processing Rules**. 1. Select **Add Rule**. 1. Enter a title for the rule. For example, "Airship to Adobe Analytics Integration." 1. Select **Add Action**. 1. If you need to setup an sProp or eVar to capture a dimension (e.g., Event Type), select **Overwrite Value Of** and then select the sProp or eVar that you want to set. After the **With** label, select the `contextData` variable that you want to set the sProp or eVar with. 1. If you need to set up an Event to capture the number of times something occurred, e.g., the number of Opens, select **Set Event** and then select the Adobe Analytics Event you want to set. Select **Custom Value** and set the value to 1. Then set a condition for when you want to set the event. Continuing with the *Opens* example, you would set up a condition where the *If* is for the same *type* `contextData` variable, and the condition would be *equals OPEN*. This will increment the Open Event each time the Data Streaming Event Type is set to *OPEN*. This is just one example of how you can set up a variable and an event. The same concept applies for each Airship event type and dimension that you want to capture in Adobe. ### Recommended Concept Mappings Below are some recommendations on different ways that you can get started mapping the Airship concepts to Adobe Analytics concepts. This table provides example `contextData` variable keys and the recommended Adobe Analytics variable type to capture information from incoming Airship event information. See our [Real-Time Data Streaming documentation](https://www.airship.com/docs/developer/rest-api/connect/) for information on events and fields that aren't listed below. Use JSON object notation to reach nested properties (in the format `airship.property.sub-property`). In Adobe analytics, all variables are preceded by `airship.`. | Airship Concept | Recommended Adobe Analytics Mapping Context | Data Variable | | --- | --- | --- | | Data Streaming event type (e.g., send, direct open, indirect open, web notification click) | Custom event (one for each type), and an sProp for segmentation (all the people who received a message, or opened, etc.) | `type` | | Unique push ID, group ID, or variant | eVar | `airship.body.push_id`, `airship.body.group_id`, `airship.body.variant`, `airship.body.triggering_push.push_id`, `airship.body.triggering_push.group_id`, `airship.body.triggering_push.variant`, `airship.body.last_delivered.push_id`, `airship.body.last_delivered.group_id`, `airship.body.last_delivered.variant`, `airship.body.replacing_push.push_id`, `airship.body.replacing_push.group_id`, `airship.body.replacing_push.variant` | | Device Identifiers — mobile (e.g., named user, Airship channel ID) | eVar | `airship.device.ios_channel`, `airship.device.android_channel`, `airship.device.named_user`, `airship.device.identifiers.com.urbanairship.idfa` | | Device Identifiers — web (Airship channel ID) | eVar | `airship.device.channel` | | Web browser context | sProp | `airship.device.attributes.web_browser_name`, `airship.device.attributes.web_browser_type`, `airship.device.attributes.web_browser_version`, `airship.device.attributes.web_user_agent_string` | | In-App Message Resolution Type | sProp AND eVar | `airship.body.type`
(and type is `IN_APP_MESSAGE_RESOLUTION`) | | In-App Message Expiration Type | sProp AND eVar | `airship.body.type` (and type is `IN_APP_MESSAGE_EXPIRATION`) | | In-App Message Button identifiers | sProp | `airship.body.button_id`, `button.button_description` | | Adobe visitorId (via associated identifiers) | eVar | `airship.device.identifiers.AA_visitorID` | | Other Data Streaming information | Varies | You can determine what the context variable name will be based on the Data Streaming event data. Inner properties are joined with outer properties via a period. | `contextData` can take a long time to appear in the Adobe Analytics dashboard. Please allow at least one hour before contacting Airship Support. > **Important:** **Known issue:** If no processing rules have been defined, no `contextData` > variables will be available for mapping. > > As a workaround until Adobe Analytics fixes this issue, add a trivial rule > that does nothing, then proceed establishing your mapping as normal. ## Sample Data Sent to Adobe ```xml your-report-suite-id 1.0 OPEN-ios 2016-05-19T22:42:36.946Z 03f13497-1e13-11e6-bc8d-001018948f58 444449 2016-05-19T22:42:36.946Z 2016-05-19T22:42:51.511Z ec2816a3-72c7-4b9b-9ee6-ae31229f28bd mtr1234 true 72153D08-B6A2-4900-9045-6776734B183B E51089C4-DD2D-44AA-BCD0-092DD6A16085 DFEF1B87-2253-423C-97D4-003AA36F5C25 215 iPhone6,1 com.urbanairship.internalsampleapp America/Los_Angeles true US 9.3.2 -25200 en false true 7.1.0 UNPROMPTED 787bf679-4732-4722-b761-bcd9b1e7a1eb 685783c0-68b1-4d05-bc94-98e90d943fd1 1 2016-05-19T18:04:40.049Z OPEN ec2816a372c74b9b9ee6ae31229f28bd ``` # Amplitude > Level up your behavioral cohort analysis with user-level mobile data. Airship [Real-Time Data Streaming](https://www.airship.com/docs/reference/glossary/#rtds) (RTDS) delivers user-level information about push sends, conversions, and uninstall events. Adding Airship's unique information to Amplitude gives you a full view of what's going on in and around your app. By adding user-level mobile engagement data to your Amplitude data, you can leverage [Amplitude Behavioral Cohorts](https://amplitude.com/behavioral-cohorts) for targeting via Airship. You can also leverage Amplitude's behavioral cohorts in Airship as [tags](https://www.airship.com/docs/reference/glossary/#tag). ## Amplitude Integration Requirements * **Accounts** 1. Amplitude — Enterprise Account 1. Airship * Messaging * [Real-Time Data Streaming](https://www.airship.com/docs/reference/feature-packages/#data) — *Required for outbound integration only* * **Airship project** * The Airship SDK must use the same user identity as the Amplitude SDK. ## Inbound Integration The inbound integration applies Amplitude user information to Airship users as [tags](https://www.airship.com/docs/reference/glossary/#tag). It works by syncing an Amplitude behavioral cohort with Airship. Airship then sets tags on the applicable users. Once your data is in Airship, you can target users who do or do not have those tags. The tags appear in the `amplitude` [tag group](https://www.airship.com/docs/reference/glossary/#tag_group) and contain the name and ID of your synced Amplitude cohort in the format `[Amplitude] : `. For example: `[Amplitude] Has Sent Notification: y4isxl9`. See also [Identify users with similar behaviors](https://amplitude.com/docs/analytics/behavioral-cohorts) in Amplitude's documentation. ### Configuring the Inbound Integration In Airship: 1. Next to your project name, select the dropdown menu (▼), then **Settings**. 1. Under **Project settings**, select **Partner Integrations**. 1. Select **Amplitude**. 1. Select **Configure** for the inbound integration and follow the onscreen instructions to: * Create a [tag group](https://www.airship.com/docs/reference/glossary/#tag_group) and an authentication token. Amplitude uses the token to communicate with your project in Airship. * Set up an Airship audience cohort in Amplitude. From your new cohort in Amplitude, select **Sync**, then **Airship**. Airship will start setting tags representing your Amplitude data on applicable members of your Airship audience. You can continue syncing on demand or set up recurring or real-time syncing. See [Sync to third-party destinations](https://help.amplitude.com/hc/en-us/articles/360060055531-Sync-to-third-party-destinations) in Amplitude's *Syncs and integrations* documentation. ### Targeting Users In the API, target using the `"audience"` object. Specify the `amplitude` tag group and the tag in the format `[Amplitude] : `. **Targeting Amplitude tags** ```json { "audience": { "group": "amplitude", "tag": "[Amplitude] Has Sent Notification: y4isxl9" } } ``` To target in the dashboard, create a [segment](https://www.airship.com/docs/reference/glossary/#segment) and add a tag as a condition. First select the `amplitude` tag group, then search for a tag and complete configuring the segment. For individual messages, you can create a single-use segment while creating the message. You can also create reusable segments instead of having to recreate your audience selections. For [In-App Automations](https://www.airship.com/docs/reference/glossary/#iaa) and [Scenes](https://www.airship.com/docs/reference/glossary/#scene), you cannot target [server-side](https://www.airship.com/docs/guides/audience/segmentation/about/#client-server) tags directly. Instead, create a segment that includes the tags you added using this integration, then select that segment in the Audience step in the composer. See [Segments](https://www.airship.com/docs/guides/audience/segmentation/target-specific-users/#segments) in *Targeting Specific Users*. For more information, see [Targeting your audience using tags](https://www.airship.com/docs/guides/audience/tags/targeting/). ## Outbound Integration The outbound integration sends your Airship events to Amplitude using [Real-Time Data Streaming](https://www.airship.com/docs/reference/glossary/#rtds). For those events: 1. Airship sets the [named user](https://www.airship.com/docs/reference/glossary/#named_user) associated with the event as the Amplitude user ID. 1. If named user is not present, Airship sets the Android Advertising ID (AAID) or Apple Advertising ID (IDFA) associated with the event as the Amplitude device ID. 1. If neither the AAID nor IDFA is present, Airship sets the [channel](https://www.airship.com/docs/reference/glossary/#channel_term) ID associated with the event as the Amplitude device ID. If your app is configured to exclude collecting the IDFA by the Airship SDK, it cannot be sent to Amplitude. 1. If Airship cannot set the Amplitude user ID or device ID, Airship will not send the event. ### Configuring the Outbound Integration You will need your Amplitude API key, found in your [Amplitude app settings](https://analytics.amplitude.com/settings). You will also need to know the region where you have implemented Amplitude so you can select a data center, either US or EU. If you are unsure which region to select, [contact Airship Support](https://support.airship.com). In Airship: 1. Next to your project name, select the dropdown menu (▼), then **Settings**. 1. Under **Project settings**, select **Partner Integrations**. 1. Select **Amplitude**. 1. Select **Configure** for the outbound integration and follow the onscreen instructions to: * Add your Amplitude API key. * Select a data center location. * Select the Airship events to send to Amplitude. After completing setup, Airship will begin sending events from your Airship project to your Amplitude instance. ### Setting Advertising IDs For Airship RTDS events without an associated [named user](https://www.airship.com/docs/reference/glossary/#named_user), you can collect advertising IDs to be used as device IDs for events sent to Amplitude. See [Android](https://www.airship.com/docs/developer/sdk-integration/android/analytics/#associated-identifiers) and [iOS](https://www.airship.com/docs/developer/sdk-integration/apple/analytics/#associated-identifiers) custom identifiers documentation for more information. The following code examples demonstrate how to add the advertising ID on each supported platform. For iOS, associate the Apple `advertisingID` with the Airship [channel](https://www.airship.com/docs/reference/glossary/#channel_term) ID. If applicable, you can also associate Apple's `identifierForVendor` with the channel ID. For more information, see [identifierForVendor](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor) in Apple's *UIKit* documentation. #### iOS Swift ```swift // Get the current identifiers let identifiers = Airship.analytics.currentAssociatedDeviceIdentifiers() // Set the advertising ID info identifiers.advertisingID = ASIdentifierManager.sharedManager().advertisingIdentifier.UUIDString; identifiers.advertisingTrackingEnabled = ASIdentifierManager.sharedManager().advertisingTrackingEnabled; identifiers.vendorID = UIDevice.currentDevice().identifierForVendor?.UUIDString // Associate the identifiers Airship.analytics.associateDeviceIdentifiers(identifiers) ``` #### iOS Objective-C ```obj-c // Get the current identifiers UAAssociatedIdentifiers *identifiers = [UAirship.analytics currentAssociatedDeviceIdentifiers]; // Set the advertising ID info identifiers.advertisingID = [[ASIdentifierManager sharedManager].advertisingIdentifier] UUIDString]; identifiers.advertisingTrackingEnabled = [ASIdentifierManager sharedManager].advertisingTrackingEnabled; identifiers.vendorID = [[UIDevice currentDevice].identifierForVendor UUIDString]; // Associate the identifiers [UAirship.analytics associateDeviceIdentifiers:identifiers]; ``` For Android, associate the Android Advertising ID with the Airship channel ID. **Automatically track the Android Advertising ID** ```java Airship.getAnalytics().setAutoTrackAdvertisingIdEnabled(true); ``` **Manually track the Android Advertising ID** ```java // Get the Android Advertising ID info - This call is blocking and should be done in a // background thread. AdvertisingIdClient.Info adInfo = AdvertisingIdClient.getAdvertisingIdInfo(getContext()); Airship.getAnalytics() .editAssociatedIdentifiers() .setAdvertisingId(adInfo.getId(), adInfo.isLimitAdTrackingEnabled()) .apply(); ``` ### Tag Change Mapping For `tag_change` events in outbound integrations, Airship uses Amplitude's [Identify API](https://www.docs.developers.amplitude.com/analytics/apis/identify-api/) to apply tags on your Amplitude audience. Tags in an `tag_change` event's `current` object appear as `user_properties` in an Amplitude `identifyEvent`. They appear in the format `Airship ": ["", ""]`. Compare the two in the following code samples. **An Airship `tag_change` event** ```json { "id": "00000169-4a14-67b2-1ddd-d9e733622c3a", "occurred": "2019-03-04T19:00:45.106Z", "offset": "1000001260057", "processed": "2019-03-04T19:00:47.094Z", "type": "SEND_REJECTED", "device": { "ios_channel": "1ef235f0-03d5-1384-893e-a19b5cd0d110", "channel": "1ef235f0-03d5-1384-893e-a19b5cd0d110", "device_type": "IOS", }, "body":{ "add": { "crm": [ "partner", "active" ], "loyalty": [ "silver_member" ] }, "remove": { "device": [ "shoe_buyer" ] }, "current": { "crm": [ "partner", "active", "new_user" ], "loyalty": [ "silver_member", "special_offers" ], "device": [ "san_francisco", "sports" ] } }, "type": "TAG_CHANGE" } ``` **Amplitude `user_properties`** ```json { "user_properties": { "ios_channel": "1ef235f0-03d5-1384-893e-a19b5cd0d110", "channel": "1ef235f0-03d5-1384-893e-a19b5cd0d110", "device_type": "IOS", "Airship crm": ["partner", "active", "new_user"], "Airship loyalty": ["silver_member", "special_offers"], "Airship device": ["san_francisco", "sports"] } } ``` # AppsFlyer > Empower marketers with a suite of comprehensive measurement and analytics solutions. [AppsFlyer](https://www.appsflyer.com/) is a popular mobile attribution platform. With the bi-directional integration between Airship and AppsFlyer, you can import attribution data from AppsFlyer to segment and personalize messages, as well as send events back to AppsFlyer via Airship [Real-Time Data Streaming](https://www.airship.com/docs/reference/glossary/#rtds) (RTDS). Airship ingests *media source*, *campaign*, *campaign ID*, *attributed Ad ID*, or *attributed adgroup* AppsFlyer parameters as Airship attributes and then sends RTDS events back to AppsFlyer. This enables AppsFlyer to analyze Airship-driven message response. ## AppsFlyer Integration Requirements * **Accounts** 1. AppsFlyer 1. Airship * Messaging * [Real-Time Data Streaming](https://www.airship.com/docs/reference/feature-packages/#data) — *Required for outbound integration only* * **Airship project** * The Airship SDK must use the same user identity as the AppsFlyer SDK. ## Configuring the Inbound Integration In Airship: 1. Next to your project name, select the dropdown menu (▼), then **Settings**. 1. Under **Project settings**, select **Partner Integrations**. 1. Select **AppsFlyer**. 1. Select **Configure** for the inbound integration and follow the onscreen instructions to: * Create [attributes](https://www.airship.com/docs/reference/glossary/#attribute) and an authentication token — AppsFlyer uses the token to communicate with your project in Airship * Add Airship as an integrated partner in AppsFlyer ## Configuring the Outbound Integration In Airship: 1. Next to your project name, select the dropdown menu (▼), then **Settings**. 1. Under **Project settings**, select **Partner Integrations**. 1. Select **AppsFlyer**. 1. Select **Configure** for the outbound integration and follow the onscreen instructions to: * Activate Airship RTDS as a partner in AppsFlyer * Select the Airship events to send to Appsflyer ## Android Example for Associating User IDs **Bi-directional integration with AppsFlyer** ```java import ... // AppsFlyer Imports import android.util.Log; import com.appsflyer.AppsFlyerLib; import com.appsflyer.AppsFlyerConversionListener; public class SampleApplication extends Application { private static final String AF_DEV_KEY = "YOUR_DEV_KEY_FROM_APP_SETTINGS"; @Override public void onCreate() { super.onCreate(); ... AppsFlyerLib.getInstance().init(AF_DEV_KEY, conversionListener, this); AppsFlyerLib.getInstance().start(this); ... // Associating the channelID with AppsFlyerLib HashMap customData = new HashMap(); String channelId = Airship.getChannel().getId(); customData.put("android_channel", channelId); AppsFlyerLib.getInstance().setAdditionalData(customData); } } ``` ## Email Deep Linking with AppsFlyer You can use AppsFlyer OneLink to create deep links that direct a user from emails to your app or other content. OneLink handles deep links intelligently, so that your links open in your app when possible, but will resolve to a web browser if your users open links on a desktop computer or do not have your app installed. OneLink can be configured to work with Airship emails. Complete these requirements in any order: 1. **Configure a link tracking domain in Airship** — A working click tracking domain is a prerequisite for this integration. Please [contact Airship Support](https://support.airship.com) if you do not know your domain address or have not yet set one up. 1. **Host your Apple App Site Association (AASA) file** — On the same domain you have configured for click tracking you will need to host the AASA file that will be responsible for opening the app in a deep link scenario. For help with generating or configuring an AASA file contact AppsFlyer support. 1. **Configure the AppsFlyer SDK** (iOS V6.0.4 and Android V6.0.0 or later only) — You will need the AppsFlyer SDK in your application to handle deep links. See: [AppsFlyer getting started guide](https://dev.appsflyer.com/hc/docs/sdk-installation). # Branch > Use Branch deep links and attribution data in Airship. Branch is a mobile measurement and deep linking platform that helps you create seamless experiences and engage users in your app. By making small changes to your Airship implementation, you can use Branch deep links in your Airship mobile messages and emails. You can also use Branch's attribution events to understand your users in Airship. Use this data to automatically message users at critical points in your audience's lifecycle to increase conversions and customer satisfaction. ## Mobile Deep Linking with Branch Deep linking makes your app more responsive and capable of navigating to arbitrary content in response to push notifications or other interactions, much in the same way that URLs can link you to specific pages on the Web. If you have added Branch deep links to your app, you can use those with Airship by making a small change to your Airship SDK implementation. The following examples demonstrate how to hand off deep links from Airship to the Branch SDK. ### Using the iOS Deep Link Handler With the Airship iOS SDK, set the `onDeepLink` closure on `Airship` to handle deep links. This will be called when a deep link has been triggered from Airship with a provided URL. Hand off the URL to the Branch SDK: ```swift Airship.onDeepLink = { url in if Branch.getInstance()?.handleDeepLink(withNewSession: url) == true { return } ... } ``` ### Using the Android Deep Link Listener With the Airship Android SDK, you can customize how deep links are handled by setting a `DeepLinkListener` on the `Airship` instance. This will be called when a deep link has been triggered from Airship. If your app is using deep links through Android implicit intents, you will then launch your appropriate Branch activity. ```kotlin Airship.deepLinkListener = DeepLinkListener { deepLink -> /* Handle the deepLink https://help.branch.io/developers-hub/docs/android-advanced-features#section-handle-links-in-your-own-app */ val intent = Intent(context, YourActivity::class.java) intent.putExtra("branch", deepLink) intent.putExtra("branch_force_new_session", true) startActivity(intent) true } ``` ## Email Deep Linking with Branch You can use Branch to support deep links from emails to your app or other content. Branch handles deep links intelligently, so that your links open in your app when possible, but will resolve to a web browser if your users open links on a desktop computer or do not have your app installed. > **Note:** A working [click tracking domain](https://help.branch.io/using-branch/docs/universal-email-integration-guide#3-provide-click-tracking-domain) is a prerequisite for this integration. Please [contact Airship support](https://support.airship.com) if you do not know your domain address or have not yet set one up. When you enable deep link support through Branch, Branch wraps links in your emails inside a tracking URL. The Branch SDK resolves this URL and determines whether or not a client has your app, directing users to the appropriate content in the app or their web browser. ### Configuring Deep Links In the Branch dashboard: 1. Go to **Email**, then **Manager**, then **Airship**. 1. Follow the [Universal Email Integration Guide](https://help.branch.io/using-branch/docs/universal-email-integration-guide), then continue on to configure Airship. 1. Enter your click tracking domain. 1. Enter your Airship domain depending on your region: * US: `https://spgo.io` * EUCS: `https://eu.spgo.io` ![Configuring Branch deep link domains](https://www.airship.com/docs/images/branch-deep-link-setup_hu_ee3b9591a7918912.webp) *Configuring Branch deep link domains* 1. Select **Save**. ### Configuring DNS Records Point your DNS CNAME to Branch's `thirdparty.bnc.lt` domain. See this [Branch email integration help article](https://help.branch.io/using-branch/docs/universal-email-integration-guide#4-point-dns-cname-to-branch) for details. > **Note:** You must have a CNAME entry for your tracking domain that points to a specific Branch URL, e.g.: `branch-tracking-airship.com`. Branch will verify DNS records and confirm the configuration was successful. ## Branch Attribution Data in Airship Branch's *People-Based Attribution* events connect individual users' actions across platforms, helping you better understand your users and their cross-platform behaviors. This integration gives you the power to set up [Automations and Sequences](https://www.airship.com/docs/guides/messaging/messages/sequences/about/) based on attribution events from Branch. ```mermaid sequenceDiagram participant A as Audience participant B as Branch participant C as Airship B->>A: Identify user by Airship channel_id A->>B: User performs attribution event B->>C: Forward attribution event as custom event C->>A: Message to channel_id in response to custom event ``` ### Branch Attribution Data Integration Requirements * **Accounts** 1. Branch 1. Airship — Must include messaging * **Airship project** * The Airship SDK must use the same user identity as the Branch SDK. --- Events from Branch are associated with `channel_id` values in Airship. Before you can take advantage of this integration, you must update your Branch implementation to get the Airship `channel_id` and set it as a request's metadata in Branch before sending events. This makes sure that events tracked by Branch are associated with appropriate users in Airship. For more information, see: * [Set Request Metadata in Branch](https://help.branch.io/developer-hub/docs/airship-configuration?highlight=airship#3-pass-metadata-to-the-branch-sdk) * [Airship for Android: get a channel_id](https://urbanairship.github.io/android-library/urbanairship-core/com.urbanairship.channel/-airship-channel-listener/index.html) * [Airship for iOS: get a channel_id](https://urbanairship.github.io/ios-library/v20/AirshipCore/documentation/airshipcore/airshipnotifications/channelcreated) ### Configuring the Branch Integration In Airship: 1. Next to your project name, select the dropdown menu (▼), then **Settings**. 1. Under **Project settings**, select **Partner Integrations**. 1. Select **Branch**. 1. Select **Configure** for the inbound integration and follow the onscreen instructions to: * Create [custom events](https://www.airship.com/docs/reference/glossary/#custom_event) and an authentication token. Branch uses the token to communicate with your project in Airship. * Configure the Airship data integration in Branch. ### Taking Advantage of Custom Events You can set up [Automations and Sequences](https://www.airship.com/docs/guides/messaging/messages/sequences/about/) to send your audience messages when Airship receives custom events — or specific values in custom events — from Branch. You can even reference event properties in an Automation or Sequence using [Handlebars](https://www.airship.com/docs/reference/glossary/#handlebars). Using event properties to personalize or modify your message for each member of your audience can help increase the relevance of your message and the likelihood that your audience will engage. For example, to personalize a message using the custom `purchase` event from Branch below, you would probably set up your message to iterate over certain products in the `contentItems` array, and provide total purchase information from the `items` object. **Example message:** ```text Thank you for your purchase! {{#each contentItems}} {{$quantity}} x {{$product_brand}} {{$product_name}} = {{$price}}{{$currency}} {{/each}} ``` **Example Branch purchase event:** ```json { "id": "aae70da5-a276-4dd4-a11e-f5b5796a52f1", "offset": "1000000000780", "occurred": "2026-02-18T22:37:53.000Z", "processed": "2026-02-18T22:40:35.337Z", "device": { "ios_channel": "c014a2ed-4c30-4f6d-a9b3-e2ba7a01b45c", "channel": "c014a2ed-4c30-4f6d-a9b3-e2ba7a01b45c", "device_type": "IOS", "attributes": { "locale_variant": "", "app_version": "1.0", "device_model": "x86_64", "app_package_name": "com.urbanairship.partner.branch", "iana_timezone": "America/Los_Angeles", "push_opt_in": "false", "locale_country_code": "US", "device_os": "13.0", "locale_timezone": "-25200", "locale_language_code": "en", "location_enabled": "false", "background_push_enabled": "false", "ua_sdk_version": "20.3.0", "location_permission": "UNPROMPTED" } }, "body": { "name": "purchase", "value": 1.5, "session_id": "c014a2ed-4c30-4f6d-a9b3-e2ba7a01b45c", "source": "API", "properties": { "device_id": "BB127028-A87C-431B-BF62-32CCF7EB94C9", "contentItems": [ { "$content_schema": "COMMERCE_PRODUCT", "$publicly_indexable": false, "$locally_indexable": false, "$exp_date": 0, "$canonical_identifier": "item/12345", "$og_title": "My Item Title", "$canonical_url": "https://branch.io/item/12345", "$og_description": "", "$og_image_url": "", "$price": 23.2, "$quantity": 1, "$sku": "1994320302", "$product_name": "my_product_name1", "$product_brand": "my_prod_Brand1", "$product_category": "APPAREL_AND_ACCESSORIES", "$product_variant": "XL", "$rating": 0, "$rating_average": 0, "$rating_count": 0, "$rating_max": 0, "$address_street": "", "$address_city": "", "$address_region": "", "$address_country": "", "$address_postal_code": "", "$latitude": 0, "$longitude": 0, "$creation_timestamp": 0, "$currency": "USD" } ], "items": { "transaction_id": "12344555", "currency": "USD", "revenue": 1.5, "revenue_in_usd": 1.5, "exchange_rate": 1, "shipping": 10.2, "tax": 12.3, "coupon": "test_coupon", "affiliation": "test_affiliation", "search_query": "item 123", "description": "Event_description" }, "transaction": "782362138270294161" } }, "type": "CUSTOM" } ``` # Google Analytics > Send user-level mobile engagement data from Airship to Google Analytics in real time. Our Google Analytics integration sends user-level mobile engagement data from Airship to Google using a [Real-Time Data Streaming](https://www.airship.com/docs/reference/glossary/#rtds) (RTDS) connector. > **Note:** This integration does not support all the event types and properties available in the Real-Time Data Stream. If you would like to combine non-supported Airship events with Google Analytics data, we recommend using Airship's [Google Cloud Storage integration](https://www.airship.com/docs/integrations/data-warehouse/gcs/) and building reports in [Looker Studio](https://support.google.com/looker-studio/answer/6370352?hl=en#zippy=%2Cin-this-article). ## Google Analytics Integration Requirements * **Accounts** 1. Google Analytics 1. Airship — Must include both: * Messaging * [Real-Time Data Streaming](https://www.airship.com/docs/reference/feature-packages/#data) * **Mobile App** * The Google Analytics Firebase SDK must be added to your mobile app. * The Firebase App Instance ID must be shared. ## Associating the App Instance ID with a channel ID You must create custom identifiers that associate a Google Analytics App Instance ID with the user's Airship [channel](https://www.airship.com/docs/reference/glossary/#channel_term) ID. #### iOS Swift ```swift UAirship.shared().analytics .editAssociatedIdentifiers() .addIdentifier("ga4_instance_id", Analytics.appInstanceID()) .apply() ``` #### Android Java ```java FirebaseAnalytics.getInstance(this).getAppInstanceId().addOnCompleteListener(new OnCompleteListener() { @Override public void onComplete(@NonNull Task task) { if (task.isSuccessful()) { String appInstanceId = task.getResult(); Airship.getAnalytics() .editAssociatedIdentifiers() .addIdentifier("ga4_instance_id", appInstanceId) .apply(); } } }); ``` #### Android Kotlin ```kotlin FirebaseAnalytics.getInstance(this).appInstanceId .addOnCompleteListener { task -> if (task.isSuccessful) { val appInstanceId = task.result Airship.analytics.editAssociatedIdentifiers { addIdentifier("ga4_instance_id", appInstanceId) } } } ```

Once set, all associated identifiers are returned in RTDS under the "identifiers" key:

```json { "ios_channel": "a6b392d6-3b0d-4c00-98ef-5cb91d51268a", "named_user_id": "albert", "identifiers": { "foo": "bar", "verycustomid": "123554" }, "attributes": { "package_name": "com.company_name.app_name", "version": "1.0.0", "ua_library": "7.0.2" } } ```

See also: RTDS API: Device Information.

RTDS will report events about those users directly to Google Analytics through the [Google Analytics Measurement Protocol API](https://developers.google.com/analytics/devguides/collection/protocol/ga4). From there, you can create segments within Google Analytics to track mobile engagement behavior. ## Configuring the Google Analytics Integration In Airship: 1. Next to your project name, select the dropdown menu (▼), then **Settings**. 1. Under **Project settings**, select **Partner Integrations**. 1. Select **Google Analytics**. 1. Select **Configure** for the outbound integration and follow the onscreen instructions to: * Provide your Firebase App ID * Create an API secret in GA4 * Select the Airship events to send to GA4 * (Optional) [Populate the GA4 user ID](#populating-the-ga4-user-id) ### Defining Custom Dimensions in Google Analytics Airship includes some additional event parameters in the events sent to GA4. To use these properties in GA4 reports you must first define them as custom dimensions. Use the information in [GA4: Custom dimensions and metrics](https://support.google.com/analytics/answer/10075209?hl=en) and the [event-mapping table](#airship-google-analytics-event-mapping) below to create custom dimensions in your GA4 property. ### Populating the GA4 User ID {#user-id} The User-ID feature in GA4 allows you to count distinct users accurately and enables measuring their activity across different sessions, devices, and platforms. If your user ID in GA4 is the same value that you use for named users in Airship, you can optionally include that value in events. By default, the user ID is not populated. For more information, see: [GA4: Measure activity across platforms with User-ID](https://support.google.com/analytics/answer/9213390?hl=en). ## Airship-Google Analytics Event Mapping > **Important:** Because Google Analytics does not recommend high-cardinality dimensions, Airship does not include push IDs in events. If you would like to group push-related events, include [campaign categories](https://www.airship.com/docs/reference/glossary/#campaign_categories)when creating your messages. See also: [Data Formats: Campaigns Object](https://www.airship.com/docs/developer/rest-api/ua/schemas/push/#campaignsobject). Use the following table for reference when mapping Airship events to Google Analytics events. | Event | Description | GA Custom Dimensions | Notes | | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------ | | `airship_send` | Occurs whenever a push notification is sent to a device. |
  • The campaign categories.
  • Variant ID, if included.
| Not sent if a campaign category is not included | | `airship_direct_open` | Occurs when a user opens your app directly from a push notification. |
  • The campaign categories.
  • Variant ID, if included.
| Not sent if a campaign category is not included. | | `airship_uninstall` | Occurs when a user uninstalls an Airship-integrated app in response to a push. | | `airship_control` | Occurs when a device is excluded from a push because it was arbitrarily selected as a member of a control group. Membership in a control group indicates what would have happened if you did not send a message to a user at all. This occurs for A/B Test-related pushes only. | The campaign categories. | Not sent if a campaign category is not included. | # Mixpanel > Target cohorts using Airship tags and feed Airship RTDS events into Mixpanel. The Mixpanel integration supports two major functions: * **Feed [Real-Time Data Streaming](https://www.airship.com/docs/reference/glossary/#rtds) events into Mixpanel.** Adding Airship events to Mixpanel provides another behavioral dimension to analyze: audience engagement. * **Export Mixpanel cohorts to Airship as tags.** You can export cohorts once or set up *dynamic sync*, which updates the `mixpanel` tag group every 15 minutes. You can then target Mixpanel tags when creating messages: * **Segmentation:** Create a [segment](https://www.airship.com/docs/reference/glossary/#segment) using a combination of Airship tags and Mixpanel cohorts. Use these segments to send targeted [In-App](https://www.airship.com/docs/reference/glossary/#in_app_message) or [Message Center](https://www.airship.com/docs/reference/glossary/#message_center) messages. * **Automation:** If you set the Mixpanel cohort to be dynamic, you can also set up [Automations and Sequences](https://www.airship.com/docs/guides/messaging/messages/sequences/about/) based on the addition or removal of a cohort tag. See [Tag Change](https://www.airship.com/docs/guides/messaging/messages/sequences/triggers/#tag-change) in *Automation and Sequence triggers*. Read more about data export and user matching in Mixpanel's [Airship Set Up Guide](https://docs.mixpanel.com/docs/cohort-sync/integrations/airship). ## Requirements The Mixpanel integration has the following requirements: * **Accounts** 1. Mixpanel 1. Airship * Messaging * [Real-Time Data Streaming](https://www.airship.com/docs/reference/feature-packages/#data) — *Required for outbound integration only* * **Airship project** * Recommended: Enable [named user](https://www.airship.com/docs/reference/glossary/#named_user) for non-mobile channels. ### User ID mapping Airship and Mixpanel match users by the Airship [channel](https://www.airship.com/docs/reference/glossary/#channel_term) ID. Within Mixpanel, the channel ID is saved as one of the following user profile properties: * **iOS**: `$ios_urban_airship_channel_id` * **Android**: `$android_urban_airship_channel_id` If you don't use the Mixpanel SDK, add these properties and set the values with the Mixpanel API to match users by channel IDs. If you would like to specify a value to match a Mixpanel user profile to a [named user](https://www.airship.com/docs/reference/glossary/#named_user), add the `$airship_named_user` user property (the Airship SDK will not automatically declare it), which will be sent when matching. Users without `$airship_named_user` user property will instead have their `distinct_id` sent to Airship named user system. This route is intended for implementations where the same identifier value is used for both `distinct_id` (Mixpanel) and `named_user_id` (Airship). ## Inbound integration To configure the inbound integration in the Airship dashboard, complete these steps: 1. Next to your project name, select the dropdown menu (▼), then **Settings**. 1. Under **Project settings**, select **Partner Integrations**. 1. Select **Mixpanel**. 1. Select **Configure** for the inbound integration and follow the onscreen instructions to: * Create a [tag group](https://www.airship.com/docs/reference/glossary/#tag_group) and an authentication token. Mixpanel uses the token to communicate with your project in Airship. * Configure the Airship integration in Mixpanel. ### Send Mixpanel cohorts to Airship as tags After [configuring the Mixpanel inbound integration](#mixpanel-inbound-integration), you can use your Mixpanel cohorts to set tags on your audience, helping you organize and retarget your audience based on analytics information from Mixpanel. To have Mixpanel send selected cohorts, you need to *export* each cohort to your Airship integration. To export a cohort, complete these steps in Mixpanel: 1. Go to **Data Management**, then **Cohorts**. 1. Select the more menu icon (⋮) for a cohort, then **Export to ...**, then **Airship**. 1. Specify if the cohort should be sent one time only or dynamically (at predefined intervals). See also: [Mixpanel's Airship documentation](https://docs.mixpanel.com/docs/cohort-sync/integrations/airship). ## Outbound integration Mixpanel library initialization requires a Mixpanel project token. See [Find Project Token](https://docs.mixpanel.com/docs/orgs-and-projects/managing-projects#find-your-project-tokens) to locate your token. To set up the outbound integration, complete the following: 1. Configure your app to set the `mixpanel_distinct_id` on Airship events. See the Android and iOS setup sections below for more information. 1. Set up the RTDS integration in the Airship dashboard. When you set up a Mixpanel RTDS integration, your events will contain a `mixpanel_distinct_id` key. This is the identifier Mixpanel uses to differentiate between unique events. As a fallback, you may want to set your Airship named user value to `mixpanel_distinct_id` to ensure that events are matched within Mixpanel. ### Set up RTDS for Android [Mixpanel Android SDK Docs](https://developer.mixpanel.com/docs/android) ```java // Initialize the Mixpanel library with your project token MixpanelAPI mixpanel = MixpanelAPI.getInstance(context, "MIXPANEL_PROJECT_TOKEN"); // Get the Mixpanel distinct ID String distinctId = mixpanel.getDistinctId(); // Add the distinct ID to the current associated identifiers Airship.getAnalytics() .editAssociatedIdentifiers() .addIdentifier("mixpanel_distinct_id", distinctId) .apply(); ``` ### Set up RTDS for iOS Swift [Mixpanel Swift SDK Docs](https://developer.mixpanel.com/docs/swift) ```swift // Initialize the Mixpanel library with your project token Mixpanel.initialize(token: "MIXPANEL_PROJECT_TOKEN") let mixpanel = Mixpanel.mainInstance() // Get the Mixpanel distinct ID let distinctId = mixpanel.distinctId // Add the distinct ID to the current associated identifiers let identifiers = Airship.analytics.currentAssociatedDeviceIdentifiers() identifiers.set(identifier: distinctId, key:"mixpanel_distinct_id") Airship.analytics.associateDeviceIdentifiers(identifiers) ``` ### Set up RTDS for iOS Objective-C [Mixpanel Objective-C SDK Docs](https://developer.mixpanel.com/docs/ios) ```obj-c // Initialize the Mixpanel library with your project token Mixpanel *mixpanel = [Mixpanel sharedInstanceWithToken:@"MIXPANEL_PROJECT_TOKEN"]; // Get the Mixpanel distinct ID NSString *distinctId = mixpanel.distinctId; // Add the distinct ID to the current associated identifiers UAAssociatedIdentifiers *identifiers = [UAirship.analytics currentAssociatedDeviceIdentifiers]; [identifiers setIdentifier:distinctId forKey:@"mixpanel_distinct_id"]; [UAirship.analytics associateDeviceIdentifiers:identifiers]; ``` ### Set up RTDS for React Native [Mixpanel React Native SDK Docs](https://developer.mixpanel.com/docs/react-native) ```javascript // Initialize the Mixpanel library with your project token const mixpanel = await Mixpanel.init('MIXPANEL_PROJECT_TOKEN', true); // Get the Mixpanel distinct ID const distinctId = await mixpanel.getDistinctId(); // Add the distinct ID to the current associated identifiers UrbanAirship.associateIdentifier("mixpanel_distinct_id", distinctId); ``` ### Set up the Mixpanel RTDS integration in Airship You will need your Mixpanel project token. To set up the RTDS integration in the Airship dashboard, complete these steps: 1. Next to your project name, select the dropdown menu (▼), then **Settings**. 1. Under **Project settings**, select **Partner Integrations**. 1. Select **Mixpanel**. 1. Select **Configure** for the outbound integration and follow the onscreen instructions to enter your Mixpanel project token and set the data residency region that matches your Mixpanel project: US, EU, or India. ### Event type mapping In Mixpanel, you can find your events by type, prefixed with *Airship*, for example, *Airship First Opt-in* for the `"type": "FIRST_OPT_IN"` event. Because the `custom` event type differentiates between events by `name`, Mixpanel uses the event `name` for custom events (if the event has a name), in the format *Airship `body.name`*. The following table shows how Airship event types map to Mixpanel events: | Airship Event | Mixpanel Event | |---|---| | `CLOSE` | `Airship Close` | | `CONTROL` | `Airship Control` | | `CUSTOM` | `Airship` + `custom.name` (Example: `Airship Add To Cart`)

Defaults to `Airship Custom` if `body.name` is absent.| | Email Bounce1 | `Airship Bounce` | | Email Click1 | `Airship Click` | | Email Delay1 | `Airship Delay` | | Email Delivery1 | `Airship Delivery` | | Email Injection1 | `Airship Injection` | | Email Open1 | `Airship Open` | | Email Unsubscribe1 | `Airship Unsubscribe` | | `FIRST_OPEN` | `Airship First Open` | | `FIRST_OPT_IN` | `Airship First Opt-in` | | `IN_APP_BUTTON_TAP` | `Airship In-App Button Tap` | | `IN_APP_EXPERIENCES` | `Airship In-App Experiences` | | `IN_APP_FORM_DISPLAY` | `Airship In-App Form Display` | | `IN_APP_FORM_RESULT` | `Airship In-App Form Result` | | `IN_APP_MESSAGE_DISPLAY` | `Airship In-App Message Display` | | `IN_APP_MESSAGE_EXPIRATION` | `Airship In-App Message Expiration` | | `IN_APP_MESSAGE_RESOLUTION` | `Airship In-App Message Resolution`| | `IN_APP_PAGE_SWIPE` | `Airship In-App Page Swipe` | | `IN_APP_PAGE_VIEW` | `Airship In-App Page View` | | `IN_APP_PAGER_COMPLETED` | `Airship In-App Pager Completed` | | `IN_APP_PAGER_SUMMARY` | `Airship In-App Pager Completed` | | `LOCATION` | `Airship Location` | | `MOBILE_ORIGINATED` | `Airship Mobile Originated` | | `OPEN` | `Airship Open` | | `REGION` | `Airship Region` | | `RICH_DELETE` | `Airship Rich Delete` | | `RICH_DELIVERY` | `Airship Rich Delivery` | | `RICH_READ` | `Airship Rich Read` | | `SCREEN_VIEWED` | `Airship Screen Viewed` | | `SEND` | `Airship Send` | | `SEND_ABORTED` | `Airship Send Aborted` | | `SEND_REJECTED` | `Airship Send Rejected` | | `SHORT_LINK_CLICKED` | `Airship Short Link Click` | | SMS Delivery Report — Aborted2 | `Airship SMS Delivery Aborted` | | SMS Delivery Report — Delivered2 | `Airship SMS Delivered` | | SMS Delivery Report — Dispatched2 | `Airship SMS Delivery Dispatched` | | SMS Delivery Report — Expired2 | `Airship SMS Delivery Expired` | | SMS Delivery Report — Failed2 | `Airship SMS Delivery Failed` | | SMS Delivery Report — Rejected2 | `Airship SMS Delivery Rejected` | | SMS Delivery Report — Undeliverable2 | `Airship SMS Delivery Undeliverable` | | SMS Delivery Report — Unknown2 | `Airship SMS Delivery Unknown` | | `SUBSCRIPTION` | `Airship Subscription` — indicates change in email subscription status or values | | `WEB_CLICK` | `Airship Web Click` | | `WEB_SESSION` | `Airship Web Session` | | `UNINSTALL` | `Airship Uninstall` | 1. Email delivery report events are `CUSTOM` type events with a `body.name` property indicating the delivery status of an email. Mixpanel uses the `body.name` key rather than the `type` key to better represent the event.
2. SMS Delivery reports are `CUSTOM` type events that use the `body.name` property to represent the status of your SMS delivery (as reported by the last-mile provider). ### Event property mapping The following table shows how Airship event properties map to Mixpanel event properties: | Airship Event Property | Mixpanel Event Property | |---|---| | `body.event_type` | `Specific Event Type` (The event `type` property is already called `Event Type`.) | | `body.identifiers.msisdn` | `MSISDN` | | `body.identifiers.sender` | `Sender` | | `body.properties.inbound_message` | `Inbound Message` | | `body.properties.keyword` | `Keyword` | | `body.properties.outbound_message` | `Outbound Message` | | `device.amazon_channel` | `Amazon Channel ID` | | `device.android_channel` | `Android Channel ID` | | `device.attributes.app_package_name` | `App Package Name` | | `device.attributes.app_version` | `App Version` | | `device.attributes.background_push_enabled` | `Background Push Notifications Enabled` | | `device.attributes.device_model` | `Model` | | `device.attributes.device_os` | `OS Version` | | `device.attributes.iana_timezone` | `Timezone` | | `device.attributes.locale_country_code` | `Country Code` | | `device.attributes.locale_language_code` | `Language Code` | | `device.attributes.locale_timezone` | `Timezone Offset` | | `device.attributes.locale_variant` | `Language Variant` | | `device.attributes.location_enabled` | `Location Services Enabled` | | `device.attributes.location_permission` | `Location Permission` | | `device.attributes.push_opt_in` | `Opted Into Push Notifications` | | `device.attributes.ua_sdk_version` | `Airship SDK Version` | | `device.attributes.web_browser_name` | `Browser` | | `device.attributes.web_browser_type` | `Web Browser Type` | | `device.attributes.web_browser_version` | `Web Browser Version` | | `device.attributes.web_user_agent_string` | `Web User Agent String` | | `device.channel` | `Channel ID` | | `device.delivery_address` | `Delivery Address` | | `device.device_type` | `Device Type` | | `device.identifiers.AA_visitorID` | `Adobe Visitor ID` | | `device.identifiers.address` | `Email Address` | | `device.identifiers.com.urbanairship.aaid` | `Android/Amazon Ad ID` | | `device.identifiers.com.urbanairship.gimbal.aii` | `Gimbal App Instance ID` | | `device.identifiers.com.urbanairship.limited_ad_tracking_enabled` | `Limited Ad Tracking Enabled` | | `device.identifiers.com.urbanairship.vendor` | `Apple Vendor ID` | | `device.identifiers.GA_CID` | `Google Analytics Client ID`| | `device.identifiers.IDFA` | `IDFA` | | `device.ios_channel` | `iOS Channel ID` | | `device.named_user_id` | `Named User ID` | | `id` | `Event ID` | | `offset` | `Event Offset` | | `occurred` | `Time` | | `type` | `Event Type` | ### Tag change event property mapping When Airship sends a tag change event to Mixpanel, Mixpanel reflects the `current` tags as event properties. Mixpanel uses the tag group as the property and the tags in the group as the value. **Example tag change event** ```json { "id": "00000169-4a14-67b2-1ddd-d9e733622c3a", "occurred": "2020-06-23T19:00:45.106Z", "offset": "1000001260057", "processed": "2020-06-23T19:00:47.094Z", "type": "TAG_CHANGE", "device": { "ios_channel": "1ef235f0-03d5-1384-893e-a19b5cd0d110", "channel": "1ef235f0-03d5-1384-893e-a19b5cd0d110", "device_type": "IOS", }, "body":{ "add": { "crm": [ "partner", "active" ], "loyalty": [ "silver_member" ] }, "current": { "crm": [ "partner", "active", "new_user" ], "loyalty": [ "silver_member", "special_offers" ], "device": [ "san_francisco", "sports" ] } }, "type": "TAG_CHANGE" } ``` From the example above, Mixpanel maps tag groups and tags as follows: | Airship Event Property | Mixpanel User Property | Value | |---|---|---| | `body.current.crm` | `Airship crm` | `["partner", "active", "new_user"]` | | `body.current.loyalty` | `Airship loyalty` | `["silver_member", "special_offers"]` | | `body.current.device` | `Airship device` | `["san_francisco", "sports"]` | # Snowplow > Send Real-Time Data Streaming events to Snowplow with our Amazon Redshift integration. Snowplow helps you track all events across all channels to give you an up-to-the-minute view of user behaviors. With the Airship [Real-Time Data Streaming](https://www.airship.com/docs/reference/glossary/#rtds) integration you will have access to all your mobile data in addition to any other data you want to collect via Snowplow. This enables you to have complete control over your data warehouse. Amazon Redshift is used so your data analysts can run custom queries and generate reports. * Understand user lifecycle. * Uncover activation behaviors that lead to long term users. * Optimize user acquisition spend based on the highest performing source that leads to conversions. ## Snowplow Integration Requirements This integration requires these accounts: 1. Snowplow 1. Airship — Must include both: * Messaging * [Real-Time Data Streaming](https://www.airship.com/docs/reference/feature-packages/#data) ## Configuring the Snowplow Integration [Contact Snowplow](https://snowplow.io/contact-us/) to set up this integration. For a list of events tracked, see [Snowplow's Airship integration documentation](https://docs.snowplow.io/docs/collecting-data/collecting-data-from-third-parties/urban-airship-connect/). # Supermetrics > Create meaningful customer relationships by transforming fragmented interactions into seamless journeys. [Supermetrics](https://supermetrics.com/) Supermetrics Data Activation is an Orchestration Customer Data Platform (CDP) that empowers businesses to create meaningful customer relationships by utilizing smart technology to transform fragmented interactions into seamless journeys. The Supermetrics–Airship server-to-server connector allows brands to send audience data from Supermetrics to Airship as [custom events](https://www.airship.com/docs/reference/glossary/#custom_event). You can use the events to target your mobile app audience. ## Integration Requirements * **Accounts** 1. Supermetrics — [Data Activation](https://supermetrics.com/platform/activate-data) 1. Airship — Must include messaging * **Airship project** * [named user](https://www.airship.com/docs/reference/glossary/#named_user) must be enabled for your project. ## Configure the Integration In Airship: 1. Next to your project name, select the dropdown menu (▼), then **Settings**. 1. Under **Project settings**, select **Partner Integrations**. 1. Select **Relay42**. 1. Select **Configure** for the inbound integration and follow the onscreen instructions to: * Create an authentication token. Supermetrics uses the token to communicate with your project in Airship. * Configure the Airship integration in Supermetrics. For additional detail, see [Supermetrics' Data Activation documentation](https://docs.supermetrics.com/docs/data-activation).