Segment integration

You can integrate the Adjust SDK with the Segment SDK in one of the following ways:

  • Independent SDK solution - The Adjust SDK works independently from the Segment SDK. Using this solution makes it easier for you to implement additional Adjust SDK features, such as deep links.
    To learn how to complete setting up this integration in the Adjust and Segment dashboards, see Set up Segment independent integration.

  • Wrapped SDK solution - The Segment SDK can wrap 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 track events in their respective systems. This solution uses SDK events and so is more robust for SKAdNetwork optimization.
    To learn how to complete setting up this integration in the Adjust and Segment dashboards, see Set up Segment SDK-SDK integration.

With both solutions, you need to define your events in the Segment dashboard.

Warning:
These solutions do not support partner parameters (iOS | Android).
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.

Independent SDK solution setup

1. Segment SDK setup

In the Segment SDK, you define your track API call events. Each event records a single user action. The Segment SDK makes corresponding event tracking calls to the Adjust SDK in Cloud Mode.

  1. Integrate the Segment SDK (iOS | Android | React Native).
Note:
Do not pass .context.device.id or .context.device.type in the track payload. The Segment SDK automatically retrieves these attributes from the device. Manually passing these attributes can cause integration issues.
  1. Create track calls for each event that you want to track in your app (iOS | Android | React Native).
    • Optional: You can pass custom key value pairs into the properties object. The Segment SDK will pass these properties into the Adjust SDK event tracking call as Callback Parameters. Adjust Partner Parameters are not supported.

2. Adjust SDK setup

  1. Integrate the Adjust SDK in your app (iOS | Android SDK).
  2. Pass the following parameters to the Adjust SDK as Session Partner Parameters (iOS | Android). In order for these parameters to be available on install or start of a session, you need to use Delay Start (iOS | Android).
    • anonymous_id - Required for Adjust to send callbacks to Segment. You can retrieve the anonymous_id value from the Segment SDK (iOS | Android).
    • Optional: user_id - This is the value that you define, so you can retrieve it from your system.

Wrapped SDK solution setup

Important:
Do not integrate the Adjust SDK directly into your app. If you have already integrated the Adjust SDK directly, remove it from your app.

The Segment SDK initializes the Adjust SDK. Adjust then tracks installs and/or sessions automatically. The app then makes track calls in the Segment SDK, which makes corresponding event tracking calls in the Adjust SDK in Device Mode. Segment sometimes sends events in Cloud Mode even when using Device Mode. This is a known issue. This causes Adjust to receive events from the Adjust SDK and the S2S integration, often on the same event token.

  1. Integrate the Segment SDK (iOS | Android).

  2. Add the Adjust integration in the Segment SDK (iOS | Android).

  3. Create track calls for each event that you want to track in your app (iOS | Android | React Native).

    • Optional: You can pass custom key value pairs into the properties object. The Segment SDK will pass these properties into the Adjust SDK event tracking call as Callback Parameters. Adjust Partner Parameters are not supported.
Note:
If you want to implement additional Adjust SDK features that are not supported in the Segment SDK, such as deep links, see Segment documentation (iOS | Android).