Skip to main content

Segment

Segment Logo

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.

  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 Add Destination.

    segment-1

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

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

SettingData typeDescription
Account IDstringYour Rokt Account ID.
AppSecret (also known as API Key in Segment)stringYou 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.
    segment-4

  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.
    segment-5

  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.

    segment-6

  6. Click Send Event.

    note

    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.

    segment-7

  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.
    segment-8

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

note

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,
    });

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

Currently in Public Beta

Pre-requisites

  1. Make sure you have an audience available within Segment's Engage feature. More information on Engage audiences can be found here.
  2. 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:

  1. From your Segment workspace, go to Connections > Catalog and select the Destinations tab of the catalog.

  2. Search for Rokt Audiences (Actions) and select the destination.

  3. Click Add destination.

segment-add-destination

  1. Select the space in Engage to use as the Source as this destination only supports sending Engage Audiences to Rokt.

  2. On the Settings tab, enter the name of your destination. For example, Rokt audiences – <audience name>.

  3. Enter your RPub, RSec, and Account id values in the integration and click Save Changes.

segment-add-destination

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

segment-action-sync-engage-audience

  1. Go to the Settings tab and select the toggle to Enable the destination.

  2. Select your space, and navigate to Engage > Audiences. Select the source audience that you want to send to your Rokt Audiences (Actions) destination.

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

segment-audience-destination

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

note

Keep in mind that it can take 12-24 hours for the first sync when the number of email identifies are in the millions.

Was this article helpful?