Data warehouse integrations are available as a premium add-on for Kameleoon’s Web Experimentation and Feature Experimentation module. For more information, contact your Customer Success Manager.
Set up audience targeting
To target visitors with an audience from Amazon Redshift, complete the following steps in order.- Open the feature: In the selected project’s configuration, open Use Amazon Redshift as a source. Its status shows Enabled when the feature is active.
- Create Data Ingestion Tasks: With the feature enabled, click Add new task to create a Data Ingestion Task. For the fields, see Data Ingestion Tasks.
- Confirm and validate: Click Confirm to save each task, and create more tasks by repeating step 2. When you finish, click Validate to save and apply your configuration settings.
- Create custom data: Kameleoon starts collecting data at the frequency you set by running each query on your Amazon Redshift instance. To use the collected data, create custom data.
- Create a segment: Create a segment based on your custom data to target visitors with the collected data.
Data Ingestion Tasks
A Data Ingestion Task runs a SQL query against your Redshift database at the frequency you set, and it imports the result as an audience. Each task needs the query, the cluster details, and a run frequency. Kameleoon polls your warehouse at the frequency you set for each task. When a poll succeeds, the audience is available for targeting in your campaigns. You can use the polled data with Kameleoon’s Activation API for web experiments and Kameleoon’s SDKs for Feature Experimentation. If a poll fails, Kameleoon logs the failure, and the audience keeps the membership from the last successful poll until a later poll succeeds.Creating a Data Ingestion Task
To create a Data Ingestion Task:- Click Add new task.
- Complete the form:
- Name (Required): Give your task a unique and descriptive name to identify its purpose.
- Redshift cluster type (Required): Specify whether you use a provisioned or serverless Redshift cluster. If you choose Provisioned, you must provide your cluster ID. If you choose Serverless, you must provide your namespace and workgroup.
- Redshift AWS region (Required): your Redshift cluster’s region code. You can find this in your AWS console. Example:
us-west-2. - Database (Required): the name of the Redshift database containing the data you are ingesting.
- Frequency (Required): Specify how often you want the task to run and retrieve data from Amazon Redshift (for example, per day).
- Query (Required): Provide the SQL query that retrieves the audience from your Amazon Redshift database. The query must follow this specific format:
SELECT visitor_id, attribute_1, ..., attribute_N FROM your_events_table. attribute_fields: These are optional, and you can use them for advanced targeting scenarios. Learn more about these advanced use cases in Target your imported audiences.visitor_id: the identifier Kameleoon uses to look up each visitor’s audience data. Use the same value you pass when you retrieve the audience in your code, which is either the Kameleoon visitor code or, if you pass one, your ownwarehouseKey. For guidance on choosing an identifier, see Visitor identification.
- Click Confirm to create the Data Ingestion Task.

Guidelines
Column naming
Column names can only contain letters, numbers, and underscores (_). They can’t start with a number.
Column order
The columns must appear in the exact order specified (visitor_id, followed by optional attributes) for the integration to function correctly.
Run your query before ingestion
Before saving your ingestion task, you can test your query directly in Kameleoon. Testing allows you to:- Verify the connection in real time.
- Confirm your credentials and access rights are correct, which helps detect issues immediately, without having to wait for the first data import.
- Validate your data’s structure and accessibility.
Updating a Data Ingestion Task
To update a Data Ingestion Task:- Select the task: Select a Data Ingestion Task from the dropdown menu.
- Edit task details: Modify the fields you want to update, such as the task’s name, frequency, Redshift cluster, region, database, or query.
- Confirm changes: Click Confirm to save the changes to the Data Ingestion Task.
Deleting a Data Ingestion Task
Before you delete a Data Ingestion Task, delete its associated custom data. To delete a Data Ingestion Task:
- Select the task: Select a Data Ingestion Task from the dropdown menu.
- Initiate deletion: Click Delete data ingestion task.
- Confirm deletion: Click Confirm to delete the selected Data Ingestion Task.
Targeting your imported audiences
Each Data Ingestion Task defines an audience, and you target that audience through a custom data entry and a segment. Choose the approach that matches what you want to target:- A pre-built audience: For example, all visitors born in London. Create one custom data entry that lists every Ingestion Task audience, then build a segment from it.
- A visitor attribute: For example, the birth city of each visitor, with many different values. Add the attribute as a field after
visitor_idin your query, then create a custom data entry that holds its value.