Integrate Kameleoon with Salesforce Audience Studio (Krux DMP)

Written by Julie Trenque

Updated on 03/12/2024

2 min


Manage your integrations






Data Warehouses


Was this content useful?

Formerly called Salesforce Krux DMP, Salesforce Audience Studio enables brands to capture, unify, and activate their data to strengthen consumer relationships across every touchpoint with a powerful data management platform. With Audience Studio brands can use their data to inform their strategy across every touchpoint to create better advertising, commerce, and content experiences.

Through our data bridge, Salesforce Audience Studio makes data available to Kameleoon directly from the browser to allow real time segmentation and triggering of personalizations. All Audience Studio segments can then be used within Kameleoon’s segment builder to power deeper, more informed targeting of visitors through access to all of the data within the Audience Studio DMP.

With the deep custom data bridge, you can create individual segments in Kameleoon based on the segments from the Salesforce Audience Studio DMP.

Key benefits

  • Combine Salesforce Audience Studio third-party data with behavioral and contextual data from Kameleoon and create advanced audiences of visitors to better personalize the experience for visitors.
  • Combine Kameleoon data with offline data and take a multi-channel approach, delivering personalized experiences at key points in the customer journey.
  • Personalize the experience even for first time unknown visitors who are browsing your site or mobile app for the first time.

Custom integration with Salesforce Audience Studio

You need to create a new custom data.

Use the Custom Javascript Code acquisition method. This code should be placed in the custom code section of the custom data.

var k_segment_krux = localStorage.krux_segs;
if(!k_segment_krux || k_segment_krux.length == 0 ) {
    return null;
    k_segment_krux = k_segment_krux.split(",");
    return {value: k_segment_krux, overwrite: true};

“krux_segs” depends on your technical implementation of the DMP. Please ask your Salesforce Audience Studio Customer Success Manager.

The custom data should be set to the list of and string types, the scope may be set to Page, depending on the scope of the segments being defined in Salesforce Audience Studio; when being set to page it is reevaluated on every page load, if the user is within a certain segment being identified by Salesforce Audience Studio.

Fetching Salesforce Audience Studio segment data in Kameleoon

The available segments in your DMP are being made available by Salesforce Audience Studio via a REST-API. API Key, login and password should be provided. Please talk to your Salesforce Audience Studio Success Manager (or the person in charge of the DMP at the company level) to get these informations and replace them within this snippet:

var xhr = new XMLHttpRequest();"GET", '

api_key=XXXX&', false);

var kruxSegments = [];

xhr.onreadystatechange = function() {

    if (this.readyState === XMLHttpRequest.DONE && this.status === 200) {

        var krux = JSON.parse(xhr.response); (segment) {

          if (segment.segment_uuid && !== 'undefined') {

            kruxSegments.push({value: segment.segment_uuid, label:});






return kruxSegments;

You will notice that in this code we call a Kameleoon Webservice, which wraps the salesforce API to get all the segments. This is needed to go throughout CORS policy issues.

Then insert this snippet into the Save the values for the targeting condition associated with the custom data point of the same custom data (last step).

Using a Salesforce Audience Studio segment in a Kameleoon segment

After the custom data for the Audience Audience Studio segments has been set up, you can build segments within the Kameleoon segment builder, by choosing the custom data and selecting is among the values, which will then show a list of every segment from the Salesforce Audience Studio DMP. Selecting one or multiple Salesforce Audience Studio segments will enable a targeting in personalizations and experiments.

  • In this article :