Urban Airship Connect delivers user-level information about push sends, conversions, and uninstall events. Adding Urban 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 for targeting via Urban Airship.
To get started, you must obtain the following:
An Enterprise plan with Amplitude
An Urban Airship plan that includes Connect
Once your contract details are in order, the setup is straightforward. Below is a summary checklist, followed by detailed instructions. We will also send you to the Amplitude documentation for the Amplitude-specific steps.
- Install Urban Airship and Amplitude SDKs in your project.
- Set Urban Airship channel as a custom User Property in Amplitude.
- Associate users with IDFA for iOS and AAID for Android, using Urban Airship’s ID Matching feature.
- Add respective credentials to Urban Airship and Amplitude dashboards to enable segmentation for behavioral cohorts.
Set up Amplitude
On the Amplitude end, follow the steps in the Urban Airship/Amplitude Integration Guide. We’ll see you back here shortly.
Associate your Amplitude user’s
identifierForVendor (IDFA, for iOS) or Advertising Identifier (AAID, for
Android) with the Urban Airship channel ID. See ID Matching for details on this feature.
If the IDFA or AAID isn’t set on the user, Urban Airship will not send over any data. We will only send events that have the IDFA/AAID associated with them.
Add the iOS Advertising ID:
// Get the current identifiers let identifiers = UAirship.shared().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.shared().analytics.associateDeviceIdentifiers(identifiers)
// Get the current identifiers UAAssociatedIdentifiers *identifiers = [[UAirship shared].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 shared].analytics associateDeviceIdentifiers:identifiers];
Automatically track the Android Advertising ID:
Manually track the Android Advertising ID:
// Get the Android Advertising ID info - This call is blocking and should be done in a // background thread. AdvertisingIdClient.Info adInfo = AdvertisingIdClient.getAdvertisingIdInfo(getContext()); UAirship.shared().getAnalytics() .editAssociatedIdentifiers() .setAdvertisingId(adInfo.getId(), adInfo.isLimitAdTrackingEnabled()) .apply();
From within the Urban Airship dashboard, with your app selected, click Connect from the top navigation. Click the Amplitude integration option to begin setup.
Name and configure a new Amplitude integration:
- Enter a user-friendly name and description.
- Enter your Amplitude API key, found in your Amplitude app settings.
- Choose one or more event type:
- Direct opens
Click the Save button.
Now that the setup is complete, Urban Airship will send events from this app to your Amplitude instance, and you can start reporting.