Adjust is an industry-leading mobile attribution provider that allows you to bring all your business data together to get powerful insights from it.

RudderStack allows you to configure your mobile devices with our SDKs to send your customer event data to Adjust - without any hassle. You can check the code for Adjust destination on our GitHub for Android and iOS.

Find the open source transformer code for this destination in our GitHub repository.

Getting started

Before configuring your source and destination on the RudderStack app, please check whether the platform you are working on is supported by Adjust. Refer to the table below:

Connection ModeWebMobileServer
Device mode-Supported-
Cloud modeSupportedSupportedSupported
To know more about the difference between cloud mode and device mode in RudderStack, refer to the RudderStack Connection Modes guide.

Once you have confirmed that the platform supports sending events to Adjust, perform the steps below:

Do not add native Adjust SDK to your project as it will prevent you from successful integration.
adjust

Adding device mode integration

Once you add Adjust as a destination in the RudderStack dashboard, follow these steps to add it to your project depending on your integration platform:

To add Adjust to your iOS project, please follow these steps:
  1. Add the following line to your CocoaPods Podfile
    pod 'Rudder-Adjust'
  2. After adding the dependency, you must register the RudderAdjustFactory with your RudderClient initialization as a factory of RudderConfig. To do this, run the following command to import the RudderAdjustFactory.h file in your AppDelegate.m file.
    #import <Rudder-Adjust/RudderAdjustFactory.h>
  3. Then, change the SDK initialization to the following:
    RudderConfigBuilder *builder = [[RudderConfigBuilder alloc] init];
    [builder withDataPlaneUrl:DATA_PLANE_URL];
    [builder withFactory:[RudderAdjustFactory instance]];
    [RudderClient getInstance:WRITE_KEY config:[builder build]];
This device mode integration is supported for Adjust v4.29.7 and above.
To add Adjust to your iOS project, follow these steps:
  1. Install RudderAdjust (available through CocoaPods) by adding the following line to your Podfile:
    pod 'RudderAdjust', '~> 1.0.0'
  2. Run the pod install command.
  3. Next, import the SDK depending on your preferred platform:
    import RudderAdjust
    @import RudderAdjust;
  4. Add the imports to your AppDelegate file under the didFinishLaunchingWithOptions method, as shown:
    let config: RSConfig = RSConfig(writeKey: WRITE_KEY)
    .dataPlaneURL(DATA_PLANE_URL)
    RSClient.sharedInstance().configure(with: config)
    RSClient.sharedInstance().addDestination(RudderAdjustDestination())
    RSConfig *config = [[RSConfig alloc] initWithWriteKey:WRITE_KEY];
    [config dataPlaneURL:DATA_PLANE_URL];
    [[RSClient sharedInstance] configureWith:config];
    [[RSClient sharedInstance] addDestination:[[RudderAdjustDestination alloc] init]];
To add Adjust to your Android project, follow these steps:
  1. Add mavenCentral() to the repositories section of your build.gradle file:
    repositories {
    mavenCentral()
    }
  2. Add the following permissions to your AndroidManifest.xml file:
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    // If you are not targeting the Google Play Store, you need to add the following permission:
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
    // If you are targeting Android 13 and above (API level 33), you need to add the com.google.android.gms.AD_ID permission to read the device's advertising ID.
    <uses-permission android:name="com.google.android.gms.permission.AD_ID"/>
  3. Add the following lines in your build.gradle file under dependencies:
    // RudderStack Android-SDK
    implementation 'com.rudderstack.android.sdk:core:[1.0,2.0)'
    // RudderStack Adjust-SDK
    implementation 'com.rudderstack.android.integration:adjust:1.0.1'
    // Add Google Play Services library to enable the Google Advertising ID for Adjust SDK
    implementation 'com.google.android.gms:play-services-ads-identifier:17.0.1'
    // To support the Google Play Referrer API, make sure you have the following in your build.gradle file:
    implementation 'com.android.installreferrer:installreferrer:2.2'

    For more information on the implementation com.google.android.gms:play-services-ads-identifier:17.0.1, refer to this Adjust help guide.

  4. After adding the dependency, register the RudderAdjustFactory with your RudderClient initialization as a factory of RudderConfig. To do so, add the following line in your Application class:
    import com.rudderstack.android.integration.adjust.AdjustIntegrationFactory;
  5. Finally, change the SDK initialization to the following:
    val rudderClient: RudderClient = RudderClient.getInstance(
    this,
    WRITE_KEY,
    RudderConfig.Builder()
    .withDataPlaneUrl(DATA_PLANE_URL)
    .withFactory(AdjustIntegrationFactory.FACTORY)
    .build()
    )
To enable Adjust to track your game event data through RudderStack, follow these steps:
  1. First, add RudderStack's Unity SDK to your project.
    Follow the RudderStack Unity SDK guide for more information.
  2. Once you have added the SDK to your project, download the Adjust SDK extension package from GitHub and import it in your project.
    The package comes with Adjust Unity SDK embedded in it along with the required jar files for Android Install Referrer. It is not recommended to add the Adjust SDK separately.
  3. After importing the rudder-unity-extension-adjust.unitypackage to your project, attach the RudderPreferbs.prefab file from RudderUnityPlugin to your main GameObject
  4. Finally, change the initialization of the SDK using the following code:
    // Build your config
    RudderConfigBuilder configBuilder = new RudderConfigBuilder()
    .WithEndPointUrl(DATA_PLANE_URL)
    .WithFactory(RudderAdjustIntegrationFactory.GetFactory());
    // Get instance for RudderClient
    RudderClient rudderClient = RudderClient.GetInstance(
    WRITE_KEY,
    configBuilder.Build()
    );

Identify

When you call identify for tracking user data, RudderStack will call Adjust's addSessionPartnerParameter method to set anonymousId and/or userId so that the value is passed from Adjust to the subsequent calls.

Here is an example:

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

Track

When you make the track call, RudderStack maps the eventName with the pre-defined list of custom events from Adjust.

You must define the map of Adjust eventToken to eventName in the dashboard. If you don't define the mapping Adjust will not accept the event.

We add all the properties as callbackParameter in the Adjust event.

The following snippet is a simple demonstration of the trackcall:

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

For revenue event, add the fields total and currency to properties and it will be mapped to Adjust's revenue event.

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

Reset

if you call reset method, RudderStack will call resetSessionCallbackParameters of the Adjust SDK to reset the user ID as well as the associated traits and properties of that user.

[[RudderClient sharedInstance] reset];

Install attribution

Adjust's native SDK handles install attribution out of the box with RudderStack. For testing Install Attribution as well as troubleshooting tips, please follow this guide.

Install Attribution is not supported in cloud-mode

Environment and logging

The Adjust environment depends on the RudderLogLevel. RudderLogLevel.DEBUG or higher will set the environment to Sandbox and logLevel to VERBOSE . For anything below that, the environment will be set to Production and logLevel to ERROR.

Contact us

For queries on any of the sections covered in this guide, you can contact us or start a conversation in our Slack community.

Contents