adjust-icon

Segment SDK 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 record 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.

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 iOS SDK.

  2. Create track calls for each event that you want to measure in your app.

    • Optional: You can pass custom key value pairs into the properties object. The Segment SDK will pass these properties into the Adjust SDK event recording call as callback parameters. Adjust partner parameters aren’t supported.

2. Adjust SDK setup

  1. Integrate the Adjust Android SDK in your app.
  2. Pass the following parameters to the Adjust SDK as session partner parameters. In order for these parameters to be available on install or start of a session, you need to delay the start of the SDK.

Wrapped SDK solution

The Segment SDK initializes the Adjust SDK. Adjust then records 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 iOS SDK.
  2. Add the Adjust integration in the Segment SDK.
  3. Add additional iOS frameworks to your app. the following to your app:
  4. Create track calls for each event that you want to measure in your app.
    • 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 aren’t supported.