Segment
Rokt maintains two integrations with Segment, one for conversion data ingestion, and the other for supporting custom audiences.
Conversion Data
The Rokt destination optimizes campaign performance by integrating conversion attribution for Rokt Ads. By integrating this conversion data, you’ll unlock a suite of intelligent tools that learn from every conversion, constantly making adjustments to improve campaign targeting and bidding.
Adding the Rokt Segment destination
Before you begin, please ensure you have your Rokt Account ID. To find yours, see the instructions here.
Log into your Segment account.
Click Catalog.
Click Destinations.
Search for “Rokt”.
Click to open the Rokt Segment.
Click Add Destination.
Select the data source that you want to configure and then click Next.
Settings:
Select the option to "Fill in settings manually". After creating the new destination, you will be re-directed to the Settings page of the destination.
You can get the following configuration values from One Platform under profile settings. Contact your account manager for any issues with these credentials.
Setting | Data type | Description |
---|---|---|
Account ID | string | Your Rokt Account ID. |
AppSecret (also known as API Key in Segment) | string | You can generate this through the profile settings one One Platform. |
App ID | string | You can generate this through the profile settings one One Platform. |
Testing the Rokt destination
Once you have ensured the Rokt Segment destination is installed, authentication details are entered, and all attributes have been connected, you can test the Rokt segment destination in the following ways:
Testing the connection to Rokt
From your Segment workspace Connections tab select the newly created Rokt destination.
On the Settings tab for the Rokt destination ensure that all the connection settings have been filled out correctly, with the information provided by your Rokt account manager.
Click the Event Tester
Choose Event Builder as the event tester type.
Configure the Event Builder:
- Select Track from the "Call Type" drop-down menu.
- Leave the User ID as the default strong created by Segment.
- Under "Properties", make sure that the entries for "Key" and "Value" are the same as the data attributes that you are integrating with Rokt.
For example, if you’re integratingemail address
,firstname
,last name
, andzipcode
with Rokt, ensure that these fields are populated with appropriate string values.
Click Send Event.
noteYou should receive a "200 OK" response if you've successfully connected to Rokt. Please contact your account manager to check that the data attributes were correctly captured in Rokt’s system for the test event.
If any other response besides "200 OK" is received, please contact your Rokt account manager to troubleshoot the issue.
Activate the Rokt destination
- From the Workspaces page, click Connections.
- Click Destinations tab.
- Click the toggle next to the Setup Guide to activate the destination.
End to end testing
Once the Rokt destination is activated, please speak with your account manager to perform end to end testing on the integration. This will typically involve performing test purchases on your staging or production site to ensure all data attributes are correctly integrated. Your Rokt account manager will advise on the exact testing steps here, as well as perform any additional testing and QA.
Integrate Rokt ID with Segment
The following are instructions to integrate Rokt ID on your landing page with Segment. More information on Rokt ID.
Add the Rokt ID tag to your landing page.
On your conversion page, grab the Rokt ID value from localStorage or cookies and add it to the payload of the Segment track call with the name
passbackconversiontrackingid
. This method assumes you are using the Analytics.js library and the track API.Example code snippet where Rokt ID is stored in cookies//Grab Rokt ID from cookies
const cookieArr = decodeURIComponent(document.cookie).split('; ');
const str = "RoktTransactionId="
let passbackconversiontrackingid = "";
cookieArr.forEach(val => {
if (val.indexOf(str) === 0)
passbackconversiontrackingid = val.substring(str.length);
})
//Pass the RoktID (passbackconversiontrackingid) within the payload of the Segment track call
analytics.track('ConversionEvent', {
passbackconversiontrackingid: passbackconversiontrackingid,
});
Custom Audience Data
You can use custom audiences on the Rokt network for two primary purposes:
- Excluding existing customers from seeing your offer on the Rokt marketplace (particularly useful if your campaign objective is acquisition).
- Targeting your existing customers with a Rokt campaign.
Currently in Public Beta
Pre-requisites
- Make sure you have an audience available within Segment's Engage feature. More information on Engage audiences can be found here.
- Have your Rokt Public (rpub), Rokt Secret (rsec), and Rokt Account ID available. Your Rokt account manager can share RPub/RSec values with you. Your Rokt Account ID can be found by following instructions here.
Configuring the Integration
To add the Rokt Audiences (Actions) destination:
From your Segment workspace, go to Connections > Catalog and select the Destinations tab of the catalog.
Search for Rokt Audiences (Actions) and select the destination.
Click Add destination.
Select the space in Engage to use as the Source as this destination only supports sending Engage Audiences to Rokt.
On the Settings tab, enter the name of your destination. For example,
Rokt audiences – <audience name>
.Enter your RPub, RSec, and Account id values in the integration and click Save Changes.
- In the Mappings tab within the Rokt Audience destination, click + New Mapping and select Sync Engage Audience to Rokt under the "Actions" tab. Don't change any defaults.
Go to the Settings tab and select the toggle to Enable the destination.
Select your space, and navigate to Engage > Audiences. Select the source audience that you want to send to your Rokt Audiences (Actions) destination.
Click Add Destinations and select the Rokt Audience (Actions) destination you created. In the settings that appear on the right-hand side, toggle the Send Track option on and Send Identify.
- Within the same panel view, select "Default Setup". You may now hit Click Save in the top right corner.
Your Rokt Audiences (Actions) destination is now ready to receive audiences, and your Persona audiences are now accessible in your Rokt Advertiser dashboard.
Keep in mind that it can take 12-24 hours for the first sync when the number of email identifies are in the millions.