Optimizely X Integration Guide

In this Justuno support article, we will cover how to set up the Optimizely X integration.

At a glance: 



Last updated: 6/21/2022


By integrating Justuno with Optimizely X, you will be able to test Justuno Audiences against a Control Audience allowing you to report on conversion increases by showing Justuno Promotions to visitors vs visitors not seeing any promotions.

If you are using Optimizely Classic, please click here for instructions


Step 1: Please review the instructions provided by Optimizely on how to add custom Javascript to your Optimizely variation where you would like to show the Justuno Promotion.



Step 2: Copy & Paste the following Javascript into the custom Javascript editor you located within your chosen Optimizely variation from Step 1. Please replace [name your experiment] with a string representing your experiment. You will use this string in your Justuno targeting rule in the next step.

var ju_optimizely_experiment = '[name your experiment]';

if (typeof(window.ju_options) !== 'object'){
window.ju_options = {"targeting":{"optimizely":ju_optimizely_experiment}};
} else {
if (window.ju_options.hasOwnProperty("targeting")) {
} else {
window.ju_options.targeting = {"optimizely":ju_optimizely_experiment};

Step 3: You are all set within Optimizely. Now you just need to add a condition to your Justuno promotion's Targeting rule that essentially tells it to only show if the JSON key optimizely = [the name you updated in Step 2].

To do so, within your Justuno dashboard, navigate to the targeting rules section for your promotion and edit your existing rule in Advanced editing mode and drag the condition called "Custom JSON value" from the "Custom Values" section on the right-hand side over to the left-hand side.

Then fill in the JSON variable name as Optimizely and enter your chosen experiment name from step 2 as the value it needs to equal. See the below screenshot example.

rule configuration

NOTE: You can also add other conditions to your rule as extra required conditions that must be met, but be aware that the variation reporting will not tell you if all promotion was indeed shown to that user in that case.

Your selected Justuno promotion will now show to that particular Optimizely X variation users.