- Enable the Krux integration in Optimizely
- Create new audiences using the Krux integration
Integrating Optimizely with the Krux data management platform lets you create targeted audiences in Optimizely based on visitor segments in Krux. From there, you can run targeted tests and personalization campaigns.
There are two parts to integrating: enabling Krux in Optimizely and creating a Krux audience.
The Krux integration only works for customers using the new Krux console, not the legacy console.
1. Enable Krux in Optimizely
To enable Krux, you need two pieces of information: an API key and your namespace. Your Krux representative can provide both.
The namespace is defined by Krux and usually corresponds with your company name. For example, the namespace for ACME Company might be “acme.” You can find the namespace by looking in local storage on a page where Krux 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 Optimizely integration setup.
When you have the API key and namespace from Krux, here’s how to enable the integration:
Navigate to the Integrations tab on the Home page. Select Krux in the list, and toggle the button to On in the right sidebar.
Enter your Krux log-in credentials (username and password), API key, and namespace in the Integration Details.
Now your project is connected with Krux, and Optimizely can read the visitor segments defined in your Krux account.
The Krux integration uses the Krux visitor segments defined on your website. Each audience in Krux has a unique ID, available in a website cookie. Optimizely reads the unique ID to match a user on each page-view.
2. Create a Krux audience
After you enable the Krux integration, you can create Optimizely Audiences (or add Krux conditions to current Audiences) based on visitor segments in Krux. Here’s how, with step-by-step instructions below:
Navigate to Overview > Audiences.
Click New Audience.
Enter a name for the new audience in the Name field.
In the Conditions list, click the Krux dropdown menu.
Click and drag the Audience Segment condition into the space under Audience Conditions.
Under Audience Conditions, select the options you want from the dropdown menus.
Here’s an example audience we created:
In Krux, check the box to select each visitor segment you want to set up in Optimizely.
Here are the visitor segments set up in our example Krux account—note the Optimizely-specific category:
The dropdown shows only the visitor segments in your Krux account that have a Sub Category of "Optimizely." To expose a Krux segment to Optimizely, edit the Sub Category field to "Optimizely."
With your audience conditions set, click Save Audience.
Now you'll see your Krux segments in Optimizely.
The integration doesn’t work on first page load for a visitor. The Krux local storage key is not populated in time for the Optimizely snippet to evaluate it on the visitor’s first page load.
Here are a few common questions about the Krux integration.
Does the integration work on first page load for a visitor?
Unfortunately, no. The Krux 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 Krux visitor segments in the Optimizely audience builder?
If your Krux visitor segments aren’t showing up in the Optimizely audience builder:
In the Optimizely settings for the Krux integration, try re-entering your Krux username and password.
Confirm your API key with your Krux representative and make sure it’s entered correctly in the Optimizely settings for the Krux integration.
How do I see what Krux segments I’m in as a visitor to my site?
Navigate to Settings > Integrations to your Krux settings to find your namespace.
Look for the Krux 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 Krux added that visitor to.
If you don’t have a namespace, look for the local storage key,
Why is the Krux visitor segment in local storage, but not the Optimizely experiment?
If you see the Krux visitor segment in localStorage, but not the Optimizely experiment, try these steps:
Refresh the page.
Confirm that the Krux namespace is entered correctly in your Optimizely settings for the Krux integration.
Contact Optimizely support for further assistance.
Why can't I get into Krux visitor segments?
Try enabling a "send a do not track request" instead of setting the Krux visitor segments in local storage, which sets a "kxlastminute_optout=true" flag in local storage.
Check the segment conditions with Krux and how often Krux pushes updates. Contact your Krux representative for help if needed.