Skip to main content


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.

  1. Log into your Segment account.

  2. Click Catalog.

  3. Click Destinations.

  4. Search for “Rokt”.

  5. Click to open the Rokt Segment. Select Rokt Segment

  6. Click Configure Rokt.


  7. Select the data source that you want to configure and then click Next.


  8. Settings:

You can get the following configuration values from One Platform under profile settings. Contact your account manager for any issues with these credentials.

SettingData typeDescription
Account IDstringYour Rokt Account ID.
AppSecretstringYou can generate this through the profile settings one One Platform.
App IDstringYou 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

  1. From your Segment workspace Connections tab select the newly created Rokt destination.

  2. 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.

  3. Click the Event Tester

  4. Choose Event Builder as the event tester type.

  5. Configure the Event Builder:

    1. Select Track from the "Call Type" drop-down menu.
    2. Leave the User ID as the default strong created by Segment.
    3. 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 integrating email address, firstname, last name, and zipcode with Rokt, ensure that these fields are populated with appropriate string values.


  6. Click Send Event.


    You 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.


  7. If any other response besides "200 OK" is received, please contact your Rokt account manager to troubleshoot the issue.

Activate the Rokt destination

  1. From the Workspaces page, click Connections.
  2. Click Destinations tab.
  3. 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.

  1. Add the Rokt ID tag to your landing page.

  2. 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,
Was this article helpful?