This article will help you:
  • Use BlueKai visitor data to create Optimizely Audiences
  • Integrate BlueKai and Optimizely so that BlueKai can pass information into experiments

BlueKai is a data management platform (DMP) that makes it easy to leverage first and third party visitor data when creating and analyzing Optimizely experiments. This integration has two prerequisites:

  • An active Optimizely Enterprise subscription
  • An active BlueKai subscription

This guide walks through configuring the integration, within both your BlueKai portal and your Optimizely account.

Create a BlueKai JS Tag

  1. From, select Manage > Containers.
  2. Click Create New, enter a name that identifies the container as an Optimizely data delivery container, accept the defaults for the other settings, and then click Save and Generate Code

  3. In the Generate Code dialog, click the JS tab for the JSON Return tag type. Each time a user in your audience visits a Web page hosting the JS Return tag, BlueKai will return JSON-formatted data to the page that includes the segment ID and the categories for which the user qualified. Optimizely uses this data to associate the user with the audience. 
  4. The JS Return Tag has the following syntax:
    <script type="text/javascript" src="<SITE_ID>?ret=js&limit=<PIXEL_LIMIT>"</script>

    For more information on using the Containers tool, see BlueKai's article on creating BlueKai Containers.
  5. Click Copy in the code box on the right, and then paste the JS tag in the <head> tag of each Web page you plan to optimize above your Optimizely snippet. For example:
    //BlueKai JS Tag
    <script type="text/javascript" src=""</script>
    //Optimizely Implementation tag (see step e to get this)
    <script src="//"></script>
    //existing_head_code …

Your BlueKai snippet must be above your Optimizely snippet for this integration to function correctly.

Enable the Blukai Integration in Optimizely 

Go to the Integrations tab on the Home page and toggle the button to On in the right sidebar.

You will be prompted to enter your BlueKai Web Service User Key as well as a Web Service Private Key. Instructions to generate these authentication tokens can be found here. Turning this integration on will allow Optimizely to access the campaigns you have defined in your BlueKai account.


In order to use BlueKai campaigns with this integration, you should ensure that the campaigns are configured with the following settings for the JSON return tag.

Create new campaign type -> select ‘Site Optimization’

In addition to standard new campaign options like name, audience and vendor, select the following options:

    1. Blanket Options -> select ‘Blanket Campaign’ with type ‘Inclusive’
    2. Additional Options -> select ‘Multiple Wins Per Page’ and ‘HTTPS pull’ and ‘JSON RESULT’ and ‘Win Every Time’

If the campaign type of ‘Site Optimization’ or Additional Options of ‘Win Every Time’ is not available, please contact your Bluekai/Oracle account manager to ask for those options.

Create an Optimizely Audience Referencing a BlueKai Campaign

To create an Optimizely Audience referencing a BlueKai campaign, navigate to the Audiences tab on the Home page. After that, you can create a new audience (or add a BlueKai condition to a current audience) with this process:

  1. Click New Audience

  2. Under Possible Conditions, select BlueKai.
  3. Drag BlueKai into the main Audience Conditions section and enter the BlueKai campaign ID/value from the pre-populated drop-down.

  4. You can now see all the campaigns you've defined in BlueKai under Manage > Campaigns. Please note that if you add a new campaign to BlueKai, it may take a few minutes before it is shown in the dropdown in the Optimizely Audience builder.

You can now begin using this audience to target your experiments. To use your BlueKai audience for post experiment analysis, edit the audience and enable Segmentation. For more on how to configure and utilize audiences, see our Audience overview. For ideas on how to create personalized experiences for your BlueKai audiences, please see our Personalization article. 

If you'd like to learn more about creating audiences and campaigns in BlueKai, please visit their knowledge base