Integrate Kameleoon with Hightouch

Written by Julie Trenque

Updated on 02/07/2024

1 min


Manage your integrations






Data Warehouses


Was this content useful?

Hightouch has created a connector enabling Hightouch customers to send Hightouch user data to Kameleoon for targeting purposes. To set up this connector you can refer to the Hightouch documentation. This page describes how to target users according to the Hightouch data sent to Kameleoon

Activating your Hightouch data in Kameleoon

Once you have set up the connection to Kameleoon, this data can be made available for targeting purposes. For this you need to create a Kameleoon Custom Data that you will fill with your Hightouch data stored in Kameleoon and then target by value in your Kameleoon segments. Here are the detailed steps:

1. Create a Kameleoon Custom Data in your Kameleoon interface as described here. Let’s say you call it “hightouch_country” (with custom data index “12”, automatically attributed)  and want to target the country data stored by Hightouch. This will be a “string” type custom data, scoped to “visit” or “visitor” (depending on whether you think this attribute will change at each visit).

2. In your Kameleoon setup, make a remote call to the Kameleoon data store to fetch the Hightouch JSON stored on Kameleoon servers. Parse this JSON and set the Custom Data value to the country value. Kameleoon has many setup possibilities, with various APIs and many SDKs available and documented here. For an in-depth understanding of Kameleoon Custom Data you will find detailed technical documentation here, with emphasis on the different ways to set a Custom Data value (acquisition methods), and how to use a Custom Data here. Below we list a couple of examples to give you an idea.

If you are using the Kameleoon Android SDK the code snippet will look like this:

String hightouchId = "12345"; // Fetch your Hightouch id and convert to string
kameleoonClient.getRemoteData(hightouchId, new KameleoonDataCallback() {
 public void onSuccess(JSONObject jsonObject) {
   kameleoonClient.addData(visitorCode, new CustomData(12, jsonObject.getString("COUNTRY"))); // "visitorCode" is the Kameleoon visitor code. "12" is the index of this custom data among all your other custom data, you can find this in the Kameleoon UI.

 public void onFail(Exception exception) {
   // on fail

You will find our Android SDK developer documentation here, with specific documentation for the getRemoteData method here, and how to set Custom Data here.

If you are using Kameleoon web experimentation you can call our JavaScript Activation API in your global script like this:

Kameleoon.API.Data.retrieveDataFromRemoteSource(hightouchId, function (data) {
         if ("COUNTRY" in data)
          Kameleoon.API.Data.setCustomData("hightouch_country", data["COUNTRY"]); // In this API the custom data is identified by name rather than by index

You will find documentation for the retrieveDataFromRemoteSource method here, and setCustomData method here.

3. Create a Kameleoon targeting segment “England Users” with a condition that targets visitors with a “hightouch_country” custom data whose value is set to “England” if you wish to target Hightouch users from England.

4. Create a Kameleoon experiment that is based on the “England Users” targeting segment. Only users with a Hightouch “COUNTRY” equal to “England” will be targeted by this experiment.