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:
- The Segment SDK initializes the Adjust SDK.
- The Adjust SDK automatically records installs, sessions, and reattributions.
- In the Segment SDK, you make your
track
calls. Each call records a user event. - The Segment SDK makes corresponding event recording calls to the Adjust SDK in Device Mode.
- The Adjust SDK gets the attribution information from the Adjust backend and sends an attribution callback to the app, which the Segment SDK ingests.
- Segment records the attribution callback as a
track
event calledInstall 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.
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.
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:
2. Create Adjust destinations and add Adjust app tokens in Segment
To add Adjust as a destination in the Segment dashboard, follow these steps.
- Select Destinations > Add Destination.
- Search for
Adjust
. - Add Adjust as a destination to your source.
To add your Adjust app tokens to the Adjust destination, follow these steps.
- Select Destinations and choose your Adjust destination.
- Select App Token and enter your app token from AppView.
- 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 used | Adjust app setup | Adjust destination in Segment dashboard |
---|---|---|
Segment Android SDK and Segment iOS SDK | Multiplatform app (Same app token for iOS and Android apps) |
|
Segment Android SDK and/or Segment iOS SDK | iOS and/or Android apps with different app tokens |
|
Segment React Native SDK | Multiplatform app (Same app token for iOS and Android apps) |
|
Segment React Native SDK | iOS and Android apps with different app tokens |
|
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.
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
- In the Segment dashboard, select Destinations and choose your Adjust destination.
- Select Map Your Events to Custom Adjust Event Tokens and enter the event tokens that you copied from the Adjust dashboard.
Each Segmenttrack
event name should have a 1:1 relationship with an Adjust event token. Do not link Segmenttrack
calls with different names to the same Adjust event token. - Select Save.
5. Configure additional settings in Segment
- In the Segment dashboard, select Destinations and choose your Adjust destination.
- Find the Track Attribution Data setting and switch ON.
- 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.
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).