Set up Segment SDK-SDK integration

Segment is an Adjust analytics partner. With the SDK-SDK integration, the Segment SDK wraps the Adjust SDK, connecting both SDKs in your app with minimal effort required. This lets you manage Adjust SDK deployment through the Segment SDK, and allows Adjust and Segment to record events in respective systems.

How it works

Here's how user activity is recorded when the Adjust SDK is wrapped:

  1. The Segment SDK initializes the Adjust SDK.
  2. The Adjust SDK automatically records installs, sessions, and reattributions.
  3. In the Segment SDK, you make your track calls. Each call records a user event.
  4. The Segment SDK makes corresponding event recording calls to the Adjust SDK in Device Mode.
  5. The Adjust SDK gets the attribution information from the Adjust backend and sends an attribution callback to the app, which the Segment SDK ingests.
  6. Segment records the attribution callback as a track event called Install Attributed. The attribution callback is sent in the following instances:
    • The user installs the app for the first time.
    • The user uninstalls the app and then installs again.
    • The Adjust server records a reattribution.
    • The Adjust server records an attribution update.
Tip:

Since the Adjust SDK attribution callback can send multiple attribution callbacks for the same device, we recommend that you only use the first attribution callback for each anonymous_id in your Segment data set. This first attribution callback is Adjust's install attribution for the device.

Set up the integration

To set up the wrapped SDK solution with Segment, follow these steps.

Important:

Do not enable the Segment in Adjust. Since the Segment SDK already gets attribution information from the Adjust SDK Attribution Callback, enabling the Segment module can result in duplicate Track events in Segment reporting.

1. Configure the Adjust and Segment SDKs

For instructions on how to configure the Adjust SDK and Segment SDK, follow our Segment integration developer guides for your platform:

📖 iOS / Android

2. Create Adjust destinations and add Adjust app tokens in Segment

To add Adjust as a destination in the Segment dashboard, follow these steps.

  1. Select Destinations > Add Destination.
  2. Search for Adjust.
  3. Add Adjust as a destination to your source.

To add your Adjust app tokens to the Adjust destination, follow these steps.

  1. Select Destinations and choose your Adjust destination.
  2. Select App Token and enter your app token from AppView.
  3. Select Save.

Refer to the the following table to understand how to relate Adjust destination(s) to your source(s), based on your app setup in Adjust.

Segment SDK usedAdjust app setupAdjust destination in Segment dashboard
Segment Android SDK and Segment iOS SDKMultiplatform app (Same app token for iOS and Android apps) 
  1. Add an Adjust destination to the iOS source and an Adjust destination to the Android source. 
  2. Configure both destinations with the same Adjust token.
Segment Android SDK and/or Segment iOS SDKiOS and/or Android apps with different app tokens
  1. Add an Adjust destination to each source, as applicable.
  2. Configure each destination with its respective Adjust token.
Segment React Native SDKMultiplatform app (Same app token for iOS and Android apps)
  1. Add an Adjust destination to the React Native source.
  2. Configure the destination with the app token.
Segment React Native SDKiOS and Android apps with different app tokens 
  1. Add an Adjust destination for iOS and an Adjust destination for Android to the React Native source.
  2. Configure each destination with its respective app token.

3. Create event tokens in Adjust

Now, review your events in the Segment dashboard, and determine which events you want to link to Adjust.

For each Segment track call that you want to link to Adjust, create a corresponding Adjust event token and copy the event token.

Warning:

This solution does not support partner parameters. However, session partner parameters (iOS | Android) are supported.

If you need to send events with custom parameters to your networks, for example to support dynamic retargeting, set up these events in the Segment SDK and Adjust SDK separately. Do not link these events in the Segment dashboard to the Adjust destination.

4. Enter Adjust event tokens in Segment

  1. In the Segment dashboard, select Destinations and choose your Adjust destination.
  2. Select Map Your Events to Custom Adjust Event Tokens and enter the event tokens that you copied from the Adjust dashboard.
    Each Segment track event name should have a 1:1 relationship with an Adjust event token. Do not link Segment track calls with different names to the same Adjust event token.
  3. Select Save.

5. Configure additional settings in Segment

  1. In the Segment dashboard, select Destinations and choose your Adjust destination.
  2. Find the Track Attribution Data setting and switch ON.
  3. At the top of the screen is Adjust Settings. Turn the switch ON to enable the Destination.

When you are ready to launch the integration in Production, find the setting Send to Production Environment on Adjust and switch ON.

A screenshot from the Segment dashboard of how to configure your Adjust settings.

Parameters forwarded to Segment

You can find a list of the parameters sent in Adjust's SDK Attribution Callback using our developer documentation (iOS | Android).