This integration combines Amplitude's analytics with Airship's customer engagement tools into one unified system. Using this integration will allow you to interact with any user segment or cohort via push notifications, in-app messages, and more to advance your app engagement or conversion goals.
It's also possible to send events from Airship to Amplitude if your Airship plan includes real-time data streaming. For more information, visit Airships's documentation center.
The Airship integration is part of Amplitude Recommend. Only customers who have purchased Amplitude Recommend will be able to schedule daily and hourly syncs.
Set up the integration
To use Amplitude behavioral cohorts within Airship, follow these steps:
- If you are using Amplitude's SDKs, you will first need to integrate both the Airship and Amplitude SDKs in your app and follow the instructions in the articles linked below to link their key identifiers. If you are using Amplitude's HTTP API to send server-side events, you can send these key identifiers as user properties via Identify API.
-
- Amplitude: SDKs and APIs
- Airship: Getting Started Guide
- In the app code, link identifiers between the two services.
NOTE: We recommend you store your Airship Channel ID as a custom user property in Amplitude, named UAChannelID
.
Use this code snippet for iOS:
AMPIdentify *identify = [[AMPIdentify identify] set:@"UAChannelID" value:[UAirship
push].channelID]; [[Amplitude instance] identify:identify];
Use this code snippet for Android:
Identify identify = new Identify().set("UAChannelID", UAirship.shared().getPushManager().getChannelId());
Amplitude.getInstance().identify(identify);
Example call for Identify API:
curl --data 'api_key=040062a5d38552315b98302ba4f2f'
--data 'identification=[{"user_id":"datamonster@gmail.com",
"user_properties":{"UAChannelID":"12345-6789-01234"}}]'
https://api.amplitude.com/identify
To confirm you've configured it properly, look up your test user or device in Amplitude and see the UAChannelID
property stored as a user property at the top of your user profile.
- Next, you'll configure the integration in the Amplitude dashboard. To do so, navigate to Sources and Destinations > Select the Project > Destinations, and click Airship. A pop-up will appear.
- Enter your Airship app key and your Airship app master secret key.
- Next, configure the mapping in the Amplitude dashboard. We recommend mapping
UAChannelID
in Amplitude toAuto Channel ID
in Airship; however, you can map user ID, device ID, or any user property in Amplitude to any Airship ID.
NOTE: Auto Channel maps to the channel ID of the correct platform (Android or iOS) in Airship automatically.
4. Lastly, create a tag group in Airship called "Amplitude."
- In Airship, navigate to Settings -> APIs and Integrations and click Tag Groups. Fill in the tag name, description, and group key. Be sure to set the group key as "amplitude".
5. When your app update is deployed, you are ready to go.
Sync cohorts to Airship
To sync cohorts between Amplitude and Airship, follow these steps:
- Create a behavioral cohort in Amplitude. Make sure your cohort contains at least one user.
- In the behavioral cohort, click Sync to... in the menu and select Airship. Your Airship dashboard will begin processing this cohort as a new tag under the "Amplitude" tag group.
Once the tag has successfully been processed, compose your message in Airship’s Message Composer. You’ll find your Amplitude-defined tags in the search bar, under the Amplitude tag group. The tags created in Airship will be prefixed with [Amplitude].