How imagino fits into your workflow
- Send imagino data to Kameleoon: Connect imagino to your Kameleoon site, define the data structure, and map its attributes to Kameleoon.
- Retrieve imagino data in Kameleoon: Choose the lookup key, understand the data that imagino sends, and create custom data that reads each attribute on your website.
- Target visitors with an imagino segment: Create a segment from the custom data and use it in your experiments.
Before you begin
To configure this integration, you need the following information from Kameleoon:Send imagino data to Kameleoon
imagino sends its data to Kameleoon through a connection that you set up in imagino. Each attribute that imagino sends must map to its own custom data in Kameleoon, with a matching format. Changing the credentials of an existing connection can affect your existing data sources and projects.Set up the connection in imagino
Connect imagino to your Kameleoon instance and select the project that receives the data.- Set up a connection with the customer’s Kameleoon instance.

- Select the project that receives the data.

Define the data structure to send
Define the JSON structure of the data that imagino pushes to Kameleoon. Open the Cataloging capability options in imagino, and define the JSON structure of the data to push in Custom Properties.

Map imagino data to Kameleoon
Map each imagino attribute to the field that Kameleoon expects.- Activate the imagino audience data to push to Kameleoon.

- Edit the audience data mapping to define the fields from imagino, and the fields expected in Kameleoon (previously configured structure).


Check that Kameleoon receives the data
Confirm that Kameleoon returns the imagino attributes for a known visitor. Call the Kameleoon Data API with your site code and the lookup key of a known visitor. The response is a JSON object that contains the attributes that imagino sent for that key. If the response has no data for a known visitor, the lookup key that your website reads doesn’t match the key that imagino uses. Contact your Kameleoon Technical Account Manager to check the key and the data that Kameleoon received.
Retrieve imagino data in Kameleoon
Kameleoon receives the visitor attributes that imagino computes, stores them on its Data API servers, and exposes them in the browser. Your website reads the lookup key, and the Data API returns the attributes. The flow has four parts:- imagino computes the attributes and cohorts of each known customer.
- imagino sends them to Kameleoon, indexed on a customer identifier (the lookup key).
- On your website, Kameleoon reads the same identifier and queries the Data API to retrieve the attributes.
- Kameleoon stores the attributes as custom data, which you use in segments for targeting and reporting.
Choose the lookup key
The lookup key is the identifier that imagino uses when it sends data to Kameleoon. It is almost always your own customer identifier, such as a CRM ID, an account ID, or a hashed email. The identifier must be available on the front end (DOM, cookie, dataLayer, and so on) so that Kameleoon can retrieve the right record. Common lookup key sources:- DataLayer:
window.dataLayer[0].userId - Existing custom data:
Kameleoon.API.Visitor.customData["Account ID"] - First-party cookie: value extracted from
document.cookie
Understand the data that imagino sends
imagino sends a flat JSON object, with one entry per attribute:- Encrypt or hash the data at the source, in imagino, before sending it. Kameleoon then receives only the encrypted value, and targeting runs on this value.
- Enable Use this data only locally for targeting purposes on the custom data. The value stays stored on the visitor’s device and never reaches the Kameleoon reporting servers.

Create the custom data
Create one custom data in Kameleoon for each imagino attribute that you want to target. Choose the implementation that matches the number of imagino attributes that you need. In the code examples below, replacewindow.dataLayer[0].userId with the lookup key source that matches your website, for example Kameleoon.API.Visitor.customData["Account ID"].
- Single attribute
- Multiple attributes
Use this implementation when you need only one imagino attribute. All the logic lives in the custom data, and you don’t need to change the global script.Create a custom data with:
- Retrieval method: Custom JavaScript code
- Type and Format: those of the attribute (Single / String in the example below)
- Scope: Page

For more information about custom data types, scopes, and advanced options, see Custom data.
Target visitors with an imagino segment
A segment that uses an imagino custom data includes the visitors whose value matches the condition that you set. You can use the segment in any of your experiments.Create a segment from the imagino custom data
Create a segment that includes visitors with a given imagino value.- Click Settings > Segments > New segment.
- Enter the required information and click Continue.
- Select the custom data under the Custom data dropdown.
- Click Create.


