Set up Segment independent integration
Segment is an Adjust analytics partner. With the independent integration setup, the Adjust SDK and Segment SDK work independently of each other. Using this solution makes it easier for you to implement additional Adjust SDK features such as deep links.
How it works
Here's how user activity is recorded when the Adjust SDK and Segment SDK work independently:
- The app directly initiates the Adjust SDK.
- The Adjust SDK automatically records installs, sessions, and reattributions.
- The Segment SDK records events and the Segment server sends them to the Adjust server as S2S events in Cloud Mode.
- The Adjust server sends an install callback to the Segment server. Segment records the install callback as a
track
event calledInstall Attributed
.
Set up the integration
To set up the independent Adjust SDK solution with Segment, follow these steps.
1. Configure the Adjust and Segment SDKs
For instructions on how to configure the Adjust SDK and Segment SDK, follow the developer guides for your platform:
2. Enable Segment in Adjust
To set up Segment in Adjust, follow these steps.
See Segment's documentation to find the WRITE KEY.
Segment will receive callbacks for install activities.
3. 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 |
|
4. 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 are required to pass certain values to the Adjust SDK. See the developer documentation for your platform:
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.
5. 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.
6. 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.
- Find the Send Event Creation Time setting, and choose the appropriate option:
- ON - Segment passes the
created_at_unix
time on S2S events. However, Segment does not guarantee that events are sent in chronological order according tocreated_at_unix
, so the Adjust server probably rejects some events. - OFF - Segment does not pass a
created_at
parameter on S2S events. The Adjust server does not reject events for chronological reasons. Instead, it sets thecreated_at
timestamp equal to thereceived_at
timestamp internally. This means thecreated_at
timestamp may not be indicative of when the device actually triggered the event in the Segment SDK.
- ON - Segment passes the
- 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
Here is a list of parameters sent in Adjust's callbacks to Segment:
Placeholder | Information |
[anonymous_id] | Segment anonymous_id |
{adgroup_name} | Adgroup name, as taken from the link |
{campaign_name} | Campaign name, as taken from the link |
{creative_name} | Creative name, as taken from the link |
{network_name} | Network name, as taken from the link |
{tracker_name} | Current link name |