Adjust Device Mode Integration

Send events to Adjust in RudderStack device mode.

After you have successfully instrumented Adjust as a destination in RudderStack, follow this guide to correctly send your events to Adjust in device mode.

See the following GitHub repositories for more information on the implementation:

Add device mode integration

Follow these steps to add Adjust to your project depending on your integration platform:

Follow the steps in this section to add Adjust to your Kotlin project.

  1. In your module (app-level) Gradle file (usually <project>/<app-module>/build.gradle.kts or <project>/<app-module>/build.gradle), add the following dependencies for the RudderStack-Adjust integration:
kotlin
dependencies {
  // ...
  
  // Add Rudder Kotlin and Adjust integration SDKs:
  implementation("com.rudderstack.sdk.kotlin:android:<latest-version>")
  implementation("com.rudderstack.integration.kotlin:adjust:<latest-version>")
}
  1. For further steps like adding the Google Play Services dependency, required AndroidManifest permissions, and ProGuard rules, refer to the Adjust documentation.
  2. Add the SDK initialization and the Rudder-Adjust integration in your Application class:
kotlin
import android.app.Application
import com.rudderstack.sdk.kotlin.android.Analytics
import com.rudderstack.sdk.kotlin.android.Configuration
import com.rudderstack.integration.kotlin.adjust.AdjustIntegration

class MyApplication : Application() {
    lateinit var analytics: Analytics

    override fun onCreate() {
        super.onCreate()
        analytics = Analytics(
            configuration = Configuration(
                writeKey = "WRITE_KEY",
                application = this,
                dataPlaneUrl = "DATA_PLANE_URL",
            )
        )
        
        analytics.add(AdjustIntegration())
    }
}

Use your own Adjust instance

By default, the integration initializes the Adjust SDK from the destination configuration. Instead, you can also initialize Adjust in your app and pass that Adjust instance to the integration, which then only maps your events to Adjust event tokens and sends them.

With your own instance, you can:

  • Set any Adjust option in code, for example, a deferred deep link callback or a default tracker. The integration sets only a few options: the app token, the environment, the log level, and its own callbacks. On Android, it also turns on sending in the background.
  • Choose the Adjust environment yourself. The integration picks the environment from the SDK log level, as Environment dependency on log level describes.
  • Receive the Adjust attribution in your own callback. In the default setup, the integration creates the Adjust configuration, so your app can’t set this callback.
  • Start Adjust at app launch. The integration starts Adjust only after the SDK gets the source configuration.
  • Keep your existing Adjust setup. If your app already sets up Adjust, you add the integration without a second Adjust setup.
You can use your own Adjust instance in the Adjust Android (Kotlin) integration v2.1.0 and above.
  1. Add the Adjust Android SDK to your module (app-level) Gradle file. Use a version in the range [5.1.0, 6.0.0):
kotlin
dependencies {
  // ...
  implementation("com.adjust.sdk:adjust-android:<version>")
}
This step doesn’t add a second copy of the SDK. The Adjust integration already includes the Adjust Android SDK as a transitive dependency.
  1. Initialize Adjust with your own AdjustConfig, for example, the app token, the environment, and your listeners.
  2. Pass the Adjust instance to the integration:
kotlin
import com.adjust.sdk.Adjust
import com.adjust.sdk.AdjustConfig
import com.rudderstack.integration.kotlin.adjust.AdjustIntegration

// Initialize Adjust with your own configuration
val adjustConfig = AdjustConfig(this, "<ADJUST_APP_TOKEN>", AdjustConfig.ENVIRONMENT_PRODUCTION)
adjustConfig.setOnAttributionChangedListener { attribution ->
  // Handle the attribution
}
Adjust.initSdk(adjustConfig)

// Pass your Adjust instance to the integration
analytics.add(AdjustIntegration(Adjust.getDefaultInstance()))

When you pass your own Adjust instance, the integration:

  • Doesn’t initialize Adjust, set its log level, or register the attribution callback.
  • Doesn’t turn on sending in the background on Android. The default setup turns it on. To keep this behavior, call adjustConfig.enableSendingInBackground() before Adjust.initSdk.
  • Doesn’t send the Install Attributed event, even when the Enable Install Attribution setting is on. To send it, call track from your own attribution callback.
  • Still maps your events with the Map events to Adjust event tokens setting, and adds the anonymousId and userId partner parameters.
  • Still follows the destination configuration for the events that it sends: the destination on/off switch, consent, and event filtering.
  • Waits for the source configuration before it sends events.
  • The App Token connection setting still needs a value. The integration doesn’t use it to initialize Adjust.
  • On reset, the integration removes all Adjust global partner parameters, also the ones that your app added. This happens in both setups.

Supported events

In device mode, RudderStack supports sending the following events to Adjust:

Identify

RudderStack’s identify call lets you identify a visiting user and associate them to their actions.

RudderStack sends the user information in the identify call to Adjust’s addSessionPartnerParameter method to set the userId (or anonymousId, in case userId is absent), so that the user information is passed to the subsequent calls.

A sample identify call is shown below:

objectivec
[[RudderClient sharedInstance] identify:@"developer_user_id"
                                 traits:@{@"foo": @"bar", @"foo1": @"bar1"}];

Track

The track call lets you record the user actions along with any properties associated with them.

When you make a track call, RudderStack maps the event name with the corresponding Adjust custom event in the dashboard using Adjust’s trackEvent method.

Make sure to define the event mapping in the Map events to Adjust Event Tokens dashboard setting. Adjust will reject any events apart from these mappings.

You must create the event token in the Adjust dashboard before specifying the mappings.

Callback parameters

RudderStack sends all custom properties in your track calls as callback parameters.

A sample track call is shown below:

objectivec
[[RudderClient sharedInstance] track:@"test_event"
                          properties:@{@"key":@"value", @"foo": @"bar"}];

Partner parameters

You can also send custom properties in your track calls as partner parameters to Adjust. Adjust then sends those parameters to the external partners you have set up in your Adjust dashboard. See the FAQ for more information on adding a partner in Adjust.

RudderStack uses the property mappings specified in the RudderStack Parameters to Partner Parameters dashboard setting to check if a key is present in the track event properties and maps it to the corresponding Adjust partner parameter object.

  • Adjust will reject any properties apart from mappings specified in the RudderStack Parameters to Partner Parameters dashboard setting.
  • The partner parameters only accept the String data type.

Suppose you set the following mappings in the RudderStack dashboard:

RudderStack propertyAdjust partner parameter
revenueprice
quantityquantity

A sample track call with the above properties is shown below:

objectivec
[[RudderClient sharedInstance] track:@"purchase"
                          properties:@{@"revenue":@20.99,
                          @"currency": @"USD",
                          @"quantity": @10}];

Revenue tracking

To send revenue tracking events to Adjust, add revenue and currency to your event properties:

objectivec
[[RudderClient sharedInstance] track:@"purchase"
                          properties:@{@"revenue":@2.99, @"currency": @"USD"}];

App install attribution

RudderStack’s Adjust mobile integration (iOS and Android) automatically triggers an Install Attributed event if you have enabled Install Attribution tracking in the dashboard settings.

The enhanced attribution support is available from:

  • Rudder-Adjust Android v2.1.0 and above
  • Rudder-Adjust iOS v2.2.0 and above

Usage

Follow these steps to use the enhanced attribution tracking feature:

1. Configure token mapping in the Adjust dashboard

  1. In your Adjust dashboard, create a new event token specifically for the Install Attributed event — you can also use an existing event token in case you have one.
  2. Copy the generated event token.
  3. Use this token in the Adjust destination configuration (explained below).

2. Adjust destination configuration in RudderStack

  1. In your RudderStack dashboard, add Adjust as a mobile device mode destination.
  2. Specify your Adjust App Token.
  3. In the Map events to Adjust event tokens dashboard setting, map the Install Attributed event to the event token obtained above.
  4. Save the mapping.

3. Enable automatic attribution tracking

Toggle on the Enable Install Attribution dashboard setting to automatically track the Install Attributed event when the app is installed for the first time.

How attribution tracking works

By leveraging Adjust’s attribution callback on iOS and Android, the integration listens for an attribution change from Adjust’s SDK and triggers the event with the following Adjust attribution parameters:

KeyValueDescription
providerAdjustHardcoded value
trackerTokenattribution.trackerTokenToken of the link to which the device is currently attributed
trackerNameattribution.trackerNameName of the link to which the device is currently attributed
campaign.sourceattribution.networkName of the network to which the device is currently attributed
campaign.nameattribution.campaignName of the campaign to which the device is currently attributed
campaign.contentattribution.clickLabelThe click label tagged with the install
campaign.adCreativeattribution.creativeName of the creative to which the device is currently attributed
campaign.adGroupattribution.adGroupName of the ad group to which the device is currently attributed

An example of the attribution data automatically captured by the Install Attributed event is shown below:

json
{
  "event": "Install Attributed",
  "properties": {
    "provider": "Adjust",
    "trackerToken": "abc123",
    "trackerName": "Campaign Name",
    "campaign": {
      "source": "google",
      "name": "summer_campaign",
      "content": "click_label",
      "adCreative": "banner_ad",
      "adGroup": "mobile_users"
    }
  }
}
If any of the above values are unavailable, they are defaulted to null. This event is then sent to all the connected device mode and cloud destinations.

See the following FAQs for troubleshooting tips:

Environment dependency on log level

RudderStack sends data to the Adjust environment depending on the Logger.LogLevel parameter (Android (Kotlin)) or LoggerAnalytics.LogLevel (iOS (Swift)) set in the SDK, as listed in the table below:

LogLevelAdjust environment
VERBOSE / DEBUG / INFO / WARN / ERRORSandbox
NONEProduction

Property mapping

RudderStack’s device mode integration automatically handles device information through the native Adjust SDK. The following table shows how RudderStack events map to Adjust’s native methods:

RudderStack event/methodAdjust SDK method
Description
identify()addSessionPartnerParameter()Sets user ID for session attribution
track()
Required
trackEvent()Sends custom events to Adjust
reset()resetSessionCallbackParameters()Resets user session data
properties.revenueRevenue trackingRevenue amount for purchase events
properties.currencyRevenue trackingCurrency code for revenue
properties.*Callback parametersAll properties as callback parameters
properties.* (mapped)Partner parametersMapped properties as partner parameters
Device mode automatically handles device identification through the native Adjust SDK, so you don’t need to manually provide context.device information like in cloud mode.

Troubleshooting

IssueResolution
Events not appearing in Adjust dashboard
  • Verify that your event is mapped to an Adjust event token in the dashboard settings.
  • Check that the event token exists in your Adjust dashboard.
  • Ensure your App Token is correctly configured.
Install attribution not working
  • Ensure the Enable Install Attribution setting is enabled in your dashboard configuration.
  • Verify that the Install Attributed event is properly mapped to an Adjust event token.
  • Check that you’re not using the native Adjust SDK alongside RudderStack’s integration.
  • See the Install attribution troubleshooting section for device unregistration steps.
Partner parameters not working
  • Verify that property mappings are configured in the RudderStack Parameters to Partner Parameters setting.
  • Check that only String values are being sent (RudderStack converts numeric values automatically).
  • Ensure the partner is set up in your Adjust dashboard.
SDK integration issues
  • iOS (Obj-C): Ensure you’re using the correct version of RudderAdjust (v1.0.0+ for iOS SDK v2).
  • Android (Java): Verify that all required permissions are added to your AndroidManifest.xml.
  • Unity: Make sure you’re not adding the native Adjust SDK separately.
  • Flutter: Ensure the dependency version is compatible with your Flutter version.
Environment configuration issuesCheck the Adjust environment dependency on log level section to understand how your SDK log level affects the Adjust environment.

Questions? Let's figure it out together.

Join the RudderStack Slack community to connect with other users, customers, and the RudderStack team — or reach out for direct support.