Adjust

AIRSHIP MAINTAINED INTEGRATION

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

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.

Adjust Integration Requirements

  • Accounts
    1. Adjust
    2. 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. Go to Settings.
  2. Under Project Configuration, select Manage for Partner Integrations.
  3. Select Adjust.
  4. Select Configure for the inbound integration and follow the onscreen instructions to:

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.

  1. Add dependencies to build.gradle
    implementation 'com.adjust.sdk:adjust-android:4.22.0'
    implementation 'com.android.installreferrer:installreferrer:1.1.2'
  2. Associate channel IDs with Adjust airship_channel_id
    String channelId = UAirship.shared().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.

Add dependency to Podfile
  1. If this is your first time using CocoaPods, Install CocoaPods using gem install cocoapods. Otherwise, continue to Step 3.
  2. Run pod setup to create a local CocoaPods spec mirror.
  3. 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'.
  4. 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
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
NSString *channelId = [UAirship channel].identifier;
[Adjust addSessionPartnerParameter:@"airship_channel_id" value:channelId];

List of Attributes Received from Adjust

Attribute NameAdjust parameterAttribute IDType
Adjust Device IDadidadjust_device_idText
Adjust Device Citycityadjust_device_cityText
Adjust Device Country Subdivisioncountry_subdivisionadjust_device_country_subdivisionText
Adjust Device Country Codecountryadjust_device_country_codeText
Adjust Device Currency Codecurrencycurrency adjust_currency_codeText
Adjust Device Model Numberdevice_nameadjust_device_model_numberText
Adjust Google Play Store Store Ad ID MD5 Hashgps_adid_md5adjust_gps_ad_id_md5Text
Adjust Google Play Store Ad IDgps_adidadjust_gps_ad_idText
Adjust Device IP Addressip_addressadjust_device_ip_addressText
Adjust Is Reattributedis_reattributedadjust_is_reattributedNumber1
Adjust Device ISPispadjust_device_ispText
Adjust Device Language Codelanguageadjust_device_language_codeText
Adjust Last Session Time in Secondslast_time_spentadjust_last_time_spentNumber
Adjust Lifetime Session Countlifetime_session_countadjust_lifetime_session_countNumber
Adjust Attribution Methodmatch_typeadjust_attribution_methodText
Adjust OAID Device ID MD5 Hashoaid_md5adjust_oaid_device_id_md5Text
Adjust OAID Device IDoaidadjust_oaid_device_idText
Adjust Device Postal Codepostal_codeadjust_device_postal_codeText
Adjust Random Device Reference Tagreftagadjust_reftagText
Adjust Device Region Coderegionadjust_device_region_codeText
Adjust Reporting Currencyreporting_currencyadjust_reporting_currencyText
Adjust SDK Versionsdk_versionadjust_sdk_versionText
Adjust Session Countsession_countadjust_session_countNumber
Adjust Current Session Time in Secondstime_spentadjust_time_spentNumber
Adjust Tracking Enabledtracking_enabledadjust_tracking_enabledNumber1
Adjust Tracking Limitedtracking_limitedadjust_tracking_limitedNumber1
Adjust Web Unique IDweb_uuidadjust_web_uuidText

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
{
   "channel_id": "516a818b-b57e-4a35-b7ad-41c6ef447364",
   "device_type": "android",
   "installed": true,
   "opt_in": true,
   "background": true,
   "push_address": "<push_address>",
   "created": "2019-07-31T00:10:34",
   "last_registration": "2020-08-17T08:11:46",
   "alias": null,
   "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": "<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 PropertyDescription
adjust_attribution_methodAttribution method
partner_parametersCustom partner parameters collected by the Adjust SDK or S2S request and transmitted to third party providers via postbacks
reporting_revenueRevenue, as reported in the Adjust Dashboard, in whole currency units
revenue_floatRevenue, as sent from Adjust SDK, in whole currency units
revenue_usd_centsRevenue, in US cents
revenue_usdRevenue, in US dollars
revenueRevenue, as sent from Adjust SDK in cents

Sample Adjust Custom Event
{
    "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",
            "connection_type": "WIFI",
            "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
        }
    },
    "type": "CUSTOM"
}