Optimizely X Installation and Usage

  • Updated

 This article will help you:

  • Enable the Demandbase integration in Optimizely X
  • Create new audiences using the Demandbase integration

The Demandbase integration creates targeted B2B audiences for delivering personalized content to the companies you care about the most. Demandbase's technology allows you to do this on the very first visit to your website, before these companies have even identified themselves to you. 

Enabling Demandbase in Optimizely

  1. Navigate to Settings
  2. Click on Integrations
  3. Select an integration
  4. Click On to enable the integration in Optimizely 
  5. Click Edit
  6. Add Demandbase API key (please contact your CSM if you don't already have one)

Creating a Demandbase Audience

  1.  Navigate to the Audiences dashboard > Create New Audience.
  2. Click Demandbase to see a full list of targeting conditions. For more information on the attributes, please see this Overview (a Demandbase login is needed to view)
  3. Drag the condition to select and complete the open fields.
  4. Once you have set your audience conditions, click Save Audience.


Audience Example

Below is an example of an audience with the following conditions:

  • Industry = Financial Services
  • Employee Range = Enterprise
  • Revenue Range = $2.5B - $5B OR Over $5B

Here is what it looks like in the Audience builder:

Watch List Audience Example

Below is an example of an audience with the following watch list conditions:

watch_list_account_status = Partner


Activation on first page visit

In Optimizely X, activation modes are set at the page level. This differs from the way conditional activation was handled in Optimizely Classic; there, it was set at the experiment level.

  1. First, create and set your page's activation mode. Or, edit an existing page.
  2. In the text box, insert the code below to ensure that the experiment activates only after visitor data from Demandbase is available:
function callbackFn(activate, options) {
  // Interval in ms for polling Demandbase visitor data
  var POLL_INTERVAL = 50;
  // Max number of poll attempts
  var MAX_POLL_COUNT = 10;
  var pollCount = 0;
  function poll() {
    if (window.optimizely &&
        window.optimizely.get('visitor') &&
        optimizely.get('visitor')['vendor.demandbase'] &&
        !options.isActive) {
    } else if (pollCount < MAX_POLL_COUNT) {
      setTimeout(poll, POLL_INTERVAL);


Conditional activation means that the experiment may trigger after all the content on the page has loaded, thus causing flicker.  If you want to prevent the experiment from triggering after a certain timeout, you can edit the POLL_INTERVAL and MAX_POLL_COUNT in the conditional activation code above.  

For example, the current poll interval of 50 and max polls of 10 will ensure that Optimizely will not trigger the experiment after more than 500ms.

Was this article helpful?

1 out of 1 found this helpful