This integration is maintained by Airship. Please contact Airship for support.

Target cohorts using Airship tags and feed Airship RTDS events into Mixpanel.

The Mixpanel integration supports two major functions:

Read more about data export and user matching in Mixpanel’s Airship Set Up Guide.

Mixpanel Integration Prerequisites

To support a Mixpanel integration, you must have a Mixpanel account and an app integrated with both Airship and Mixpanel SDKs.

To establish connection to your Airship app from Mixpanel,

Create a bearer token with the All Access role.
  1. Go to Settings » Project Configuration and click Manage for Tokens.
  2. Click Create Token.
  3. Enter a token Name. This is just a friendly name to help you recognize your tokens in Airship.
  4. Select the Role you want to grant for this token. For additional information, see Airship API Security.
    • Audience Modification: Grants read and write permission to audience APIs, including channels, named users, segments, lists, etc. Use this permission for users sending custom events into Airship.
    • All Access: Grants full access to your Airship project, except Acoustic integrations. You should use this permission when creating a token for an inbound message handling webhook.
  5. Click Create Token.
  6. Copy the values, then click Got it to close the window.

Send Mixpanel Cohorts to Airship as Tags

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.

You must set up a tag group called mixpanel to take advantage of Mixpanel cohorts in Airship.

Follow setup steps in Mixpanel’s Airship Setup Guide to complete the configuration and send Mixpanel cohorts to Airship.

  1. Log in to Mixpanel.
  2. Locate your Airship integration: Data Management » Integrations » Airship.
  3. Click Connect.
  4. When prompted, paste your bearer token.

To have Mixpanel send selected cohorts, you need to export each cohort to your Airship integration:

  1. Open your cohorts: Data Management » Cohorts.
  2. In each cohort that you would like to send, click the button to open the context menu of the selected cohort. Then, select Export to … » Airship.
  3. In the dialog window that opens, specify if the cohort should be one time only or dynamically (at predefined intervals).

Mixpanel RTDS Integration

Mixpanel library initialization requires a Mixpanel project token. See Find Project Token to locate your token.

To set up this integration, you must:

  1. Configure your app to set the mixpanel_distinct_id on Airship events. See the Android and iOS setup sections below for more information.
  2. 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 set as to the mixpanel_distinct_id to ensure that events are matched within Mixpanel.

Android RTDS Setup

Mixpanel Android SDK Docs

// 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
                .addIdentifier("mixpanel_distinct_id", distinctId)

iOS Swift RTDS Setup

Mixpanel Swift SDK Docs

// 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")

iOS Objective-C RTDS Setup

Mixpanel Objective-C SDK Docs

// 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];

React Native RTDS Setup

Mixpanel React Native SDK Docs

// 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 a Mixpanel RTDS Integration in Airship

You will need your Mixpanel token to set up the integration in Airship.

  1. Go to Settings » Project Configuration and click Manage for Real-Time Data Streaming.

  2. Under Real-time Data Streaming, click Mixpanel.

  3. Enter a Name and Description for this integration. This helps you identify the integration later.

  4. Enter your Mixpanel Project Token.

  5. Select Yes if you are implemented in Mixpanel’s European Data Center; otherwise leave No checked. If you are unsure which data center you are on please contact our support team.

  6. Choose the event types you’d like to send to Mixpanel. See the next section for a reference table mapping Airship events to Mixpanel events.

  7. Click Activate.

Mapping Airship Event Types to Mixpanel

In Mixpanel, you can find your events by type, prefixed with Airship — e.g., 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.

Airship EventMixpanel Event
CLOSEAirship Close
CONTROLAirship Control
CUSTOMAirship + custom.name (Example: Airship Add To Cart)

Defaults to Airship Custom if body.name is absent.
Email Bounce1Airship Bounce
Email Click1Airship Click
Email Delay1Airship Delay
Email Delivery1Airship Delivery
Email Injection1Airship Injection
Email Open1Airship Open
Email Unsubscribe1Airship Unsubscribe
FIRST_OPENAirship First Open
FIRST_OPT_INAirship First Opt-in
IN_APP_MESSAGE_DISPLAYAirship In-App Message Display
IN_APP_MESSAGE_EXPIRATIONAirship In-App Message Expiration
IN_APP_MESSAGE_RESOLUTIONAirship In-App Message Resolution
LOCATIONAirship Location
MOBILE_ORIGINATEDAirship Mobile Originated
OPENAirship Open
REGIONAirship Region
RICH_DELETEAirship Rich Delete
RICH_DELIVERYAirship Rich Delivery
RICH_READAirship Rich Read
SCREEN_VIEWEDAirship Screen Viewed
SENDAirship Send
SEND_REJECTEDAirship Send Rejected
SHORT_LINK_CLICKEDAirship Short Link Click
SMS Delivery Report — Aborted2Airship SMS Delivery Aborted
SMS Delivery Report — Delivered2Airship SMS Delivered
SMS Delivery Report — Dispatched2Airship SMS Delivery Dispatched
SMS Delivery Report — Expired2Airship SMS Delivery Expired
SMS Delivery Report — Failed2Airship SMS Delivery Failed
SMS Delivery Report — Rejected2Airship SMS Delivery Rejected
SMS Delivery Report — Undeliverable2Airship SMS Delivery Undeliverable
SMS Delivery Report — Unknown2Airship SMS Delivery Unknown
SUBSCRIPTIONAirship Subscription — indicates change in email subscription status or values
WEB_CLICKAirship Web Click
WEB_SESSIONAirship Web Session
UNINSTALLAirship Uninstall

1Email 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.
2SMS 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).

Mapping Airship Event Properties to Mixpanel

Airship Event PropertyMixpanel Event Property
body.event_typeSpecific Event Type (The event type property is already called Event Type.)
body.properties.inbound_messageInbound Message
body.properties.outbound_messageOutbound Message
device.amazon_channelAmazon Channel ID
device.android_channelAndroid Channel ID
device.attributes.app_package_nameApp Package Name
device.attributes.app_versionApp Version
device.attributes.background_push_enabledBackground Push Notifications Enabled
device.attributes.connection_typeConnection Type
device.attributes.device_osOS Version
device.attributes.locale_country_codeCountry Code
device.attributes.locale_language_codeLanguage Code
device.attributes.locale_timezoneTimezone Offset
device.attributes.locale_variantLanguage Variant
device.attributes.location_enabledLocation Services Enabled
device.attributes.location_permissionLocation Permission
device.attributes.push_opt_inOpted Into Push Notifications
device.attributes.ua_sdk_versionAirship SDK Version
device.attributes.web_browser_typeWeb Browser Type
device.attributes.web_browser_versionWeb Browser Version
device.attributes.web_user_agent_stringWeb User Agent String
device.channelChannel ID
device.delivery_addressDelivery Address
device.device_typeDevice Type
device.identifiers.AA_visitorIDAdobe Visitor ID
device.identifiers.addressEmail Address
device.identifiers.com.urbanairship.aaidAndroid/Amazon Ad ID
device.identifiers.com.urbanairship.gimbal.aiiGimbal App Instance ID
device.identifiers.com.urbanairship.limited_ad_tracking_enabledLimited Ad Tracking Enabled
device.identifiers.com.urbanairship.vendorApple Vendor ID
device.identifiers.GA_CIDGoogle Analytics Client ID
device.ios_channeliOS Channel ID
device.named_user_idNamed User ID
idEvent ID
offsetEvent Offset
typeEvent Type

Mapping Airship Tag Change Event Properties to Mixpanel

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
  "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",
    "add": {
        "crm": [
        "loyalty": [
    "current": {
        "crm": [
        "loyalty": [
        "device": [
  "type": "TAG_CHANGE"

From the example above, Mixpanel maps tag groups and tags as follows:

Airship Event PropertyMixpanel User PropertyValue
body.current.crmAirship crm["partner", "active", "new_user"]
body.current.loyaltyAirship loyalty["silver_member", "special_offers"]
body.current.deviceAirship device["san_francisco", "sports"]