Kameleoon
Datafly Signal delivers events to Kameleoon server-to-server using the Data API (POST /visit/events). This sends page views and conversion goals as first-party server events, so experiment exposure and goal attribution keep working even when ad blockers or browser tracking prevention block client-side calls.
Prerequisites
Before configuring Kameleoon in Signal, you need an active Kameleoon project and the goals you want to track already created in the Kameleoon app.
Find your Site Code
- Log in to the Kameleoon app.
- Go to Setup > Project.
- Note your Site Code — a short alphanumeric string (e.g.
f17c21u1ag). It also appears in the URL of your Kameleoon JavaScript tag.
Confirm your data region
Kameleoon hosts the Data API on a region-specific domain:
- EU accounts use
eu-data.kameleoon.io(regioneu). - North America accounts use
na-data.kameleoon.io(regionna).
Use the region where your Kameleoon account is hosted. If you are unsure, ask your Kameleoon customer success contact.
Create your goals
Each conversion you send maps to a Kameleoon goal identified by a numeric Goal ID.
- In the Kameleoon app, go to Goals.
- Create (or open) the goal you want Signal to convert, e.g. “Purchase” or “Sign Up”.
- Note the numeric Goal ID — you will reference it when mapping conversions.
Keep the Kameleoon tag on your site
The Kameleoon JavaScript tag sets the kameleoonVisitorCode cookie that identifies each visitor inside your experiments. Signal reads this cookie so server-side conversions attribute to the same visitor that saw the experiment. Keep the tag installed.
Configuration
In Signal, add the Kameleoon integration and provide:
| Field | Description |
|---|---|
| Site Code | Your Kameleoon project Site Code (e.g. f17c21u1ag). |
| Data Region | eu or na, matching where your Kameleoon account is hosted. |
No API key is required. The Kameleoon Data API ingestion endpoint authenticates by the Site Code and visitor code carried with each event. An optional JWT only raises rate limits and is not needed for delivery.
Configure in Signal
Add the integration
- Open Integrations in your Signal management console.
- Choose Kameleoon.
- Enter your Site Code and Data Region.
Attach it to a pipeline
- Open the pipeline that carries the events you want to forward.
- Add Kameleoon as a destination and select the Default preset.
Set your Goal IDs
The blueprint maps each conversion’s goalId from an event property (kameleoon_goal_id). Either:
- Send
kameleoon_goal_idas a property on the conversion event from Datafly.js, or - Edit the conversion event mapping in Signal and set a fixed Goal ID for that event.
API Endpoint
Signal posts a JSON array of events to:
POST https://{region}-data.kameleoon.io/visit/events?siteCode={site_code}&json=true
Content-Type: application/json{region} is eu or na; {site_code} is your Site Code.
Identity Signals
Kameleoon attributes events to a visitorCode. Signal resolves it in this order:
kameleoon_visitor_code— thekameleoonVisitorCodecookie set by the Kameleoon tag (preferred; matches the visitor’s experiment session).anonymous_id— Signal’s first-party identifier, used as a fallback when the Kameleoon cookie is not present.
Each event also carries a nonce (a unique per-event token, sourced from Signal’s message_id) so Kameleoon can de-duplicate retries.
Event Mapping
Signal translates GA4-style event names into Kameleoon event types:
| Signal event | Kameleoon eventType | Key fields |
|---|---|---|
page | PAGE | href, title, referrers |
Order Completed | CONVERSION | goalId, revenue |
Order Refunded | CONVERSION | goalId, revenue, negative: true |
Signed Up | CONVERSION | goalId |
Events not in the mapping are dropped.
Example: a purchase
A Datafly.js call on your site:
datafly.track("Order Completed", {
order_id: "ORD-1001",
revenue: 23.50,
currency: "USD",
kameleoon_goal_id: 36151
});Resulting request body Signal sends to Kameleoon:
[
{
"nonce": "9f1c2d7a-4b88-4e2a-9a31-6c0e2b5d77aa",
"eventType": "CONVERSION",
"visitorCode": "245fc8a1b9",
"goalId": 36151,
"revenue": 23.50
}
]Example: a page view
datafly.page();Becomes:
[
{
"nonce": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
"eventType": "PAGE",
"visitorCode": "245fc8a1b9",
"href": "https://example.com/checkout",
"title": "Checkout"
}
]Testing
Send a test event
Trigger a page view or conversion on your site (or replay one from the Signal Event Debugger).
Confirm a 200 response
A successful POST /visit/events returns HTTP 200. Signal’s delivery logs show the request and response for each event.
Verify in Kameleoon
- In the Kameleoon app, open the relevant experiment’s results, or the visitor’s profile via the visitor code.
- Confirm the conversion appears against the expected goal, and that revenue is recorded for revenue goals.
Troubleshooting
404 Not Found — The Data Region is wrong. Confirm whether your account is on eu or na and update the Data Region field.
Conversions not attributed to an experiment — The visitor was sent with a fallback anonymous_id rather than the Kameleoon kameleoonVisitorCode. Confirm the Kameleoon JavaScript tag is installed and setting its cookie before the conversion fires.
Goal not recorded — The goalId is missing or does not match a goal in your project. Confirm the numeric Goal ID and that the goal exists in Goals in the Kameleoon app.
400 Bad Request — A required field (nonce or eventType) is missing or the body is malformed. Check the mapping for the event in Signal.
429 Too Many Requests — You have exceeded the Data API per-IP rate limit. Signal retries automatically; for sustained high volume, contact Kameleoon about enabling an authenticated (JWT) connection, which raises the limit.