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.
-
Integrate the Segment iOS SDK.
-
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.
- Optional: You can pass custom key value pairs into the
2. Adjust SDK setup
- Integrate the Adjust Android SDK in your app.
- 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.
anonymous_id
- Required for Adjust to send callbacks to Segment. You can retrieve theanonymous_id
value from the Segment SDK.- Optional:
user_id
- This is the value that you define, so you can retrieve it from your system.
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.
- Integrate the Segment iOS SDK.
- Add the Adjust integration in the Segment SDK.
- Add additional iOS frameworks to your app. the following to your app:
- 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.
- Optional: You can pass custom key value pairs into the