Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunityDoc feedbackLog In
GitHubNuGetDev CommunityDoc feedback

Configure Advanced Audience Targeting with ODP (beta)

You can integrate Optimizely Web Experimentation with Optimizely Data Platform (ODP) to use real-time segments from ODP as audiences in your Optimizely Web Experimentation experiments.

πŸ“˜

Note

Optimizely Data Platform Advanced Audience Targeting is currently in beta. Contact your customer success manager for more information.

Prerequisites

  • An Optimizely Web Experimentation account
  • An Optimizely Data Platform (ODP) account
  • Add the Optimizely Web Experimentation snippet to your site
  • Add the ODP snippet to your site

    🚧

    Important

    The ODP snippet is optional if you select the Web β€’ Visitor ID in step 7 below, or if you use mParticle or Zeotap as your customer data platform (CDP) and are implementing the passthrough version of this integration.

    If you add the ODP snippet to your site, it must be before the Optimizely Web Experimentation snippet so that the Optimizely Web Experimentation snippet can pull the ID that the ODP snippet generates.

  • You must have real-time segments set up in ODP (pre-built and/or custom)

Integration considerations

If you use mParticle or Zeotap as your CDP, you still need an ODP account, but you do not have to implement the ODP snippet on your site. To configure the Advanced Audience Targeting integration using mParticle or Zeotap as your CDP, skip to Integrate with other CDPs.

If you use ODP as your CDP, continue to Configure Advanced Audience Targeting.

Configure Advanced Audience Targeting

  1. In Optimizely Web Experimentation, go to Settings > Integrations > Advanced Audience Targeting.
  2. Toggle the integration status to On.
  3. Click You can find your API key in ODP to navigate to the APIs page in ODP.
  4. On the APIs page in ODP, copy the value in the KEY fields on both the Public and Private tabs.
  5. Navigate back to Optimizely Web Experimentation and paste these values into the corresponding fields (ODP Public Key (required) and ODP Private Key (required)).
  6. Select your region from the ODP Host (required) drop-down list.
  7. Select your desired User ID:
    • ODP β€’ VUID – The ID that ODP assigns to each customer cookie. This is the default ID for the integration.
    • Web β€’ Visitor ID – (Default) The ID that your Optimizely Web Experimentation snippet is using. Depending on your snippet settings, this is either the default Optimizely Web Experimentation visitor ID or another ID of your choice.

      🚧

      Important

      For help with selecting the User ID, see Select your User ID.

  8. Select your desired Confidence Level for the User ID you selected above:
    • Low confidence – Low confidence identifiers are unique to a device or browser and may resolve to multiple customers in certain situations. Select this option when there is a weak degree of confidence that your chosen User ID accurately represents a single customer.

      πŸ“˜

      Note

      Low confidence is the only option available if you select ODP β€’ VUID for your User ID.

    • High confidence – High confidence identifiers are unique to an individual customer. Select this option only when you have a high degree of confidence that your chosen User ID accurately represents a single customer.

      πŸ“˜

      Note

      For more information on identifier confidence levels, see Overview of customer identity and resolution.

Select your User ID

When deciding which User ID to select, consider the following requirements for each option:

ODP β€’ VUID

  • You must implement both the ODP and Optimizely Web Experimentation snippets on your site.
  • You must have the ODP snippet activating before the Optimizely Web Experimentation snippet.
  • You can not implement the ODP snippet asynchronously.
  • This is a low confidence identifier.

Web β€’ Visitor ID

  • You must implement the Optimizely Web Experimentation snippet on your site.
  • Implementing the ODP snippet is optional.
  • You can keep your performance budget for your site lower by only implementing one snippet as opposed to implementing both.
  • You can select whether you want this to be a low confidence or high confidence identifier.

Integrate with other CDPs

🚧

Important

If you use ODP as your CDP, do not complete this section. Skip to Use ODP real-time segments in your Optimizely Web Experimentation experiments.

If you use mParticle or Zeotap as your customer data platform (CDP):

  1. Configure the mParticle or Zeotap integration in ODP:
  2. In Optimizely Web Experimentation, go to Settings > Integrations > Advanced Audience Targeting.
  3. Toggle the integration status to On.
  4. Click You can find your API key in ODP to navigate to the APIs page in ODP.
  5. On the APIs page in ODP, copy the value in the KEY fields on both the Public and Private tabs.
  6. Navigate back to Optimizely Web Experimentation and paste these values into the corresponding fields (ODP Public Key (required) and ODP Private Key (required)).
  7. Select your region from the ODP Host (required) drop-down list.
  8. Select the Passthrough Implementation checkbox.
  9. Select an Identifier Type.

    🚧

    Important

    Optimizely recommends selecting an identifier type that matches the identifier sent from your CDP to ODP to increase the likelihood of user bucketing. For help with selecting the Identifier Type, see the user documentation on identifier types.

  10. Enter the Identifier Name.

Use ODP real-time segments in your Optimizely Web Experimentation experiments

Now you can begin building audiences in Optimizely Web Experimentation using ODP's pre-built and custom real-time segments.

πŸ“˜

Note

The segments on the Customers > Segments page in ODP are not available for use in this integration.

Create an audience using ODP's real-time segments

You can create and add an audience directly on your experiment (described below), or you can create the audience outside of the experiment (using the audience builder) and then add it to your experiment later.

To add an audience directly to your experiment:

  1. Within your experiment, go to Audiences.
  2. From the Search and add audiences drop-down list, select Create new audience.
  1. Complete the Name (required) and Description (optional) fields.
  2. In the audience condition options on the right, expand Advanced Audience Targeting.
  3. Drag and drop either Custom Segments or Pre-built SegmentsΒ to the Audience Conditions section.
  4. Configure the audience as desired (the real-time segments from ODP display in the Select an audience drop-down list).
  1. Click Save Audience.
  2. On the Audiences page, click Save.

πŸ“˜

Note

You must add the audience to an experiment. The Optimizely Web Experimentation snippet does not evaluate ODP real-time segment membership unless you add an audience that uses ODP real-time segments to a live experiment that is being activated. In other words, you need to add the audience you create (using the steps above) to an experiment to see this integration function on a particular webpage.

This also means that if you are checking for a value that could change ODP real-time segment membership mid-session, a page needs to be activated for an experiment using an audience to force re-evaluation (as it normally would for any other audience condition). For more information, see order of activation.

Troubleshoot the integration

Check which real-time segments you are assigned to in ODP

When Advanced Audience Targeting is enabled, Optimizely Web Experimentation makes a request to the ODP GraphQL API to retrieve the current visitor's assigned real-time segments. To inspect the data returned by that call, open the developer console and check the value of this attribute:

window["optimizely"].get("visitor")['vendor.odp']['audiences']

The content of this array should be populated with any real-time segments to which you are currently assigned.

If you do not see any real-time segments in the odp.audiences[] array, first check to see if you are a member of the returning_visitors real-time segment by navigating away from the page and returning to it. If you see yourself in the returning_visitors real-time segment on your second visit to the page, the problem most likely is that you do not belong to any other segments, or those segments have not been enabled for that page.

If, however, you are not in the returning_visitors real-time segment, it is likely that the ODP tracker is disabled. This often happens when a visitor deletes their browser cookies mid-session. In this case, the ODP tracker needs to reacquire a tracking cookie before it can identify the user. If the ODP JavaScript snippet cannot find the cookie, ODP returns an empty array of audience memberships. You can reset the cookie by logging out and back into the site.