Skip to main content

Custom audience import via web SDK


Access to custom audience import via web SDK is currently via invitation only. Please contact your Rokt account manager if you are interested in this type of import.

By integrating Rokt’s web SDK snippet on any page before your confirmation page, you can re-target users who have visited that page to drive better relevance and stronger acquisition outcomes. A dynamically generated list of users is created, including any user who visited the page but didn’t convert, which can then be linked to a newly created retargeting campaign. Using this method can reduce your Cost Per Acquisition with campaigns tailored to users further down the funnel.

Before you begin

Rokt’s web SDK must be integrated directly on all pages of interest calling the ‘selectPlacements’ method with no data attributes. For multi-page applications insert the following script into the headers of the pages of interest.

<script type="module">
const target = document.head || document.body;
const script = document.createElement("script");
script.type = "text/javascript";
script.src = "";
script.importance = "high";
script.crossOrigin = "anonymous";
script.async = true; = "rokt-launcher";
await new Promise((resolve) =>
? resolve()
: document
.addEventListener("load", () => resolve())

const launcher = await window.Rokt.createLauncher({
accountId: "rokt-account-id",
await launcher.selectPlacements({

For single-page applications (SPAs) follow this guide here, and notify your account manager that you'll be integrating through an SPA.

To ensure users who convert are removed from the list of users who visited your pages of interest, web SDK will need to be integrated on your confirmation page. If you're already recording conversions using web SDK, notify your account manager.

If you are not yet recording conversions on your confirmation page, the ‘captureConversion’ method on web SDK must be called, with the appropriate attributes integrated. See more on how to integrate web SDK on the conversion page here.

Once you've successfully integrated Rokt on the pages you want to generate custom audience lists from, reach out to your account manager for QA and testing.

Creating custom audience lists from web SDK

Your retargeting campaign requires two custom audiences to be created; one inclusion list for users who have visited the page of interest and one exclusion list for users who converted.

  1. Log in to One Platform.

  2. In the left navigation bar, go to Campaigns > Custom Audiences.

  3. Click New custom audience. custom_audience_1

  4. Select Website visitors as the audience source.

  5. Click Continue.


  6. Enter a name for your custom audience.

  7. Enter the unique portion of the URL for the page you have integrated the Rokt web SDK snippet on. For example, if you have integrated the web SDK on the product page, where the URL is, you would enter “/productpage/”.


  8. Click Save.

  9. Repeat the process above to create a second custom audience for the conversion page. Make sure to define the URL condition as a unique portion of the conversion page URL where you have the web SDK.

  10. Click Save.


    Your new custom audience will start populating immediately, assuming the web SDK is correctly integrated on the page you have specified the audience for.

Adding custom audiences to your campaign

  1. Log in to One Platform.
  2. From the left navigation, go to Campaigns.
  3. Select Edit for the campaign you want to apply your custom audiences to.
  4. Click Next to see the Audiences interface.
  5. Click Add.
  6. Name your audience and enter any other relevant demographic information.
  7. Click the Advanced drop-down and select Website retargeting.
  8. Select the custom audience for the specific page you created and set it as an inclusion list.
  9. Select the custom audience for the conversion page you created and set it as an exclusion list.
  10. Continue the configuration as you would for any other audience.

Including and excluding

  • Selecting ‘Include’ results in only showing your offer to customers within the selected custom audience who visited your specific page.
  • Selecting 'Exclude' will only show your offer to users outside the selected custom audience who converted.