Integrate Kameleoon with Adobe Audience Manager

Written by Julie Trenque

Updated on 06/05/2023

3 min

Advanced

Manage your integrations

Analytics

Automation

CDP

CMP

CMS/CRM

Data Warehouses

Developers

Was this content useful?

Adobe Audience Manager is a data management platform that helps you build unique audience profiles so you can identify your most valuable segments and use them in Kameleoon to create highly personalized campaigns.

To use this integration, you will need Administrative permissions in Adobe Audience Manager (AAM) as you will need to create a Kameleoon destination so that we can automatically retrieve from AAM  all segments details (ID and Name of each segment) and retrieve authentication credentials such as a Client ID and Secret Key.

Set up a Kameleoon Destination in Adobe Audience Manager (AAM)

The first step is to create a Kameleoon destination in AAM:

  1. Go to Manage Data > Destinations and create a new Cookie destination with at least the following settings:
    • Name: Kameleoon
    • Type: Cookie
    • Auto-fill Destination Mapping: Segment ID
  1. Click Next to go to the Configuration settings.
    • Cookie Name: the value of this field must be “aamkamsegs” (please do not change it as it will prevent the integration from working).
    • Cookie Domain: enter here all domains where the aamkamsegs cookie should be created. We recommend to indicate in this field your main domain : mymaindomain.com. To know more about it, please read this documentation
    • Data format option: please set it as Serial single key (with the following properties):
      • Key: aamsegs
      • Key-Value Pair Delimiter: should be a colon “,”
      • Serialize: uncheck the Enabled option.
  1. Click Save to add the Kameleoon destination to your AAM account.

Choose the AAM segments you want to use with Kameleoon

Once the Kameleoon destination has been created, you can choose the AAM segments you want to use with Kameleoon:

  1. Go to Manage Data > Segments and select the segments you want to use with Kameleoon.
  2. Click Add to Destination and select the Kameleoon destination. Click Save to validate.

To view all segments that will be available in Kameleoon, navigate to Manager Data > Destinations and select the Kameleoon destination. Please make sure that the Mapping column contains values like aamseg=ID of the segment. If it is not the case, please contact your AAM Customer Success Manager. 

Set up a Kameleoon Custom Data to use AAM segments

In order to be able to use your AAM segments in our Segment builder, you will need to set up a custom data in your Kameleoon account for the project of your choice. You can choose the name of your choice (eg. Adobe Audience Manager Segments). Please follow the steps below (​​settings must be configured exactly as written):

  • Acquisition method : Custom JavaScript Code. Copy and paste the code below in the custom code section of the custom data as below.
 function getCookie(cname) {
   var name = cname + "=";
   var decodedCookie = decodeURIComponent(document.cookie);
   var ca = decodedCookie.split(';');
   for(var i = 0; i <ca.length; i++) {
     var c = ca[i];
     while (c.charAt(0) == ' ') {
       c = c.substring(1);
     }
     if (c.indexOf(name) == 0) {
       return c.substring(name.length, c.length);
     }
   }
   return null;
 }
 var aam_segments = getCookie("aamkamsegs");
 if (aam_segments && aam_segments!= "" && aam_segments!= " "){
 aam_segments = aam_segments.split("=");
 if(aam_segments.length > 0){
 aam_segments = aam_segments[1];
 aam_segments = aam_segments.split(",");
 return {"value": aam_segments, "overwrite": true};
 }
 } 
  • Type: List of strings
  • Scope: Page

For each user that visits your site, Kameleoon will automatically check the presence of the “aamkamsegs” cookie and fill the custom data with the AAM segments for which the current user qualifies for. If a Kameleoon campaign runs on your project for a given AAM segment, Kameleoon will determine in real-time (with no network request to an AAM API endpoint) the user’s eligibility and display the campaign accordingly.

Fetch AAM segments’ names in Kameleoon

The AAM mapped segments’ names can be retrieved via the AAM REST API so that when you use the custom data in Kameleoon’s Segment builder, you can directly use each the AAM segment name instead of the segment ID, which is more convenient for the end user.

When you open Kameleoon Segment Builder, Kameleoon makes an authenticated request to the https://api.demdex.com/v1/destinations/{destinationId}/mappings endpoint, where the {destinationId} is being replaced with the ID corresponding to the Kameleoon Destination created.

For each mapped segment, Kameleoon retrieves the segment name (elementName) and the segment ID (sid). The segment name is then available from Kameleoon Segment Builder when you use the custom data.

In order to set up this feature, please contact your Kameleoon Customer Success Manager as we will require authentication credentials as explained in this documentation.

Use an AAM segment in Kameleoon Segment Builder

After the custom data for the AAM segments has been set up in Kameleoon, you can build segments within the Kameleoon Segment Builder, by either choosing the segment IDs you would like to target with your campaign OR by choosing the option is among the values, which will then show a list of every segment for your Kameleoon Destination (it will require an additional setup as explained at the previous step).

  • In this article :