The availability of features may depend on your plan type. Contact your Customer Success Manager if you have any questions.

Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideLegal TermsGitHubDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

Integrate Salesforce DMP

This topic describes how to enable the Salesforce DMP integration in Optimizely Web Experimentation and Optimizely Personalization and create new audiences

📘

Note

See Optimizely's Third-Party Add-Ons & Platform Integration Terms.

📘

Note

Krux was acquired by Salesforce and renamed to Audience Studio DMP. Contact your Customer Success Manager for any assistance.

Integrating Optimizely Web Experimentation and Optimizely Personalization with the Salesforce data management platform (DMP) lets you create targeted audiences based on visitor segments in Salesforce for experiments and campaigns.

There are two parts:

  • Enable Salesforce DMP in Optimizely Web Experimentation.
  • Create a Salesforce DMP audience.

Enable Salesforce DMP in Optimizely

You need an API key and your namespace to enable Salesforce DMP. Your Salesforce DMP representative can provide both.

The namespace may be missing for certain legacy Salesforce DMP accounts. The namespace is not essential to the integration, and the integration should still work if the correct API Key is provided. 

📘

Note

The namespace is defined by Salesforce DMP and usually corresponds with your company name. For example, the namespace for ACME Company might be “acme.” You can find the namespace in local storage on a page where Salesforce DMP is running.

Optimizely uses the namespace to identify which local storage key to evaluate. For the ACME Company example, the local storage key would be kxacme\_segs\_partner, but you only need to enter acme into the integration set up.

When you have the API key and namespace from Salesforce DMP, here's how to enable the integration:

  1. Go to Settings > Integrations.
  2. Select Krux in the list and toggle the button to On.
  3. Enter your log-in credentials (username and password), API key, and namespace.
  4. Click Save.

Optimizely can read the visitor segments defined in your Salesforce DMP account.

The Salesforce DMP integration uses the Salesforce DMP visitor segments defined on your website. Each audience in Salesforce DMP has a unique ID, available in a website cookie. Optimizely reads the unique ID to match a user on each page-view.

Create a Salesforce DMP audience

After you enable the Salesforce DMP integration, you can create audiences (or add Salesforce DMP conditions to current audiences) based on visitor segments in Salesforce DMP.

  1. Go to Audiences and click Create New Audience.

  2. Enter a name for the audience.

  3. Click the Salesforce DMP drop-down list for Conditions.

  4. Click and drag the Audience Segment condition into the space under Audience Conditions.

  5. Select the options you want from the drop-down lists.

  6. In Salesforce DMP, check the box to select each visitor segment you want to set up in Optimizely.

    The dropdown shows only the visitor segments in your DMP account with a subcategory of Optimizely. To expose a DMP segment, edit the subcategory field to Optimizely.

  7. Click Save Audience.

📘

Note

The DMP local storage key is not populated in time for the Optimizely snippet to evaluate it on the visitor’s first page load.

Troubleshoot issues

Does the integration work on first page load for a visitor?

No, the DMP local storage key is not populated in time for the Optimizely snippet to evaluate it on the visitor’s first-page load.

Why don't I see DMP visitor segments in the Optimizely audience builder?

If your DMP visitor segments are not showing up in the audience builder, follow these steps:

  1. Re-enter your DMP username and password in the integration settings.
  2. Confirm your API key with your DMP representative and ensure it is entered correctly in the Optimizely settings for the DMP integration.
  3. Confirm that the segments in DMP are set up with Optimizely as the subcategory. 

How do I see what DMP segments I’m in as a visitor to my site?

  1. Go to Settings > Integrations to your DMP settings to find your namespace.
  2. Look for the DMP local storage key: kx[namespace]_segs_partner. The value for the key should be a comma-separated array that includes the visitor segment IDs for segments that DMP added that visitor to.
  3. If you do not have a namespace, look for the local storage key, kxsegs\_partner.

Why is the DMP visitor segment in local storage but not the Optimizely experiment or campaign?

If you see the DMP visitor segment in localStorage but not the Optimizely experiment or campaign, try these steps:

  1. Refresh the page.
  2. Confirm that the DMP namespace is entered correctly in your settings for the DMP integration.
  3. Contact Optimizely Support for further assistance.

Why can I not get into DMP visitor segments?

  1. Try enabling a send a do not track request instead of setting the DMP visitor segments in local storage, which sets a "kxlastminute_optout=true" flag in local storage.
  2. Check the segment conditions with DMP and how often it pushes updates. If needed, contact your DMP representative for help.