Kameleoon
Datafly Signal sends page views and goal conversions to Kameleoon through the Data API, so experiment and personalisation reports count conversions the browser missed.
Why route Kameleoon through Datafly Signal
- Events arrive when the browser cannot send them. Server-side delivery is not stopped by ad blockers, tracking prevention or a page unload.
- Offline and server-confirmed conversions count. Orders and refunds confirmed on the server reach the experiment report.
Prerequisites
- Your Kameleoon site code and data region.
- The goal ids for the conversions you want (Kameleoon > Goals).
- Signal capturing the
kameleoonVisitorCodecookie askameleoon_visitor_code.
Configuration
| Field | Required | Description |
|---|---|---|
site_code | Yes | Your Kameleoon project Site Code (a short alphanumeric string). Find it in the Kameleoon app under Setup > Project (it is also embedded in your Kameleoon JavaScript tag URL). |
region | Yes | Your Kameleoon data region: ‘eu’ (eu-data.kameleoon.io) or ‘na’ (na-data.kameleoon.io). Match the region where your Kameleoon account is hosted; sending to the wrong region returns 404. |
purchase_goal_id | No | The Kameleoon goal id for an order (purchase, and refund as a negative conversion). Find it in Kameleoon under Goals. An event whose goal id is not set here (or sent as properties.kameleoon_goal_id) is not sent. |
add_to_cart_goal_id | No | The Kameleoon goal id for add to cart (ecommerce preset). Find it in Kameleoon under Goals. An event whose goal id is not set here (or sent as properties.kameleoon_goal_id) is not sent. |
checkout_goal_id | No | The Kameleoon goal id for checkout start (ecommerce preset). Find it in Kameleoon under Goals. An event whose goal id is not set here (or sent as properties.kameleoon_goal_id) is not sent. |
sign_up_goal_id | No | The Kameleoon goal id for a sign-up. Find it in Kameleoon under Goals. An event whose goal id is not set here (or sent as properties.kameleoon_goal_id) is not sent. |
lead_goal_id | No | The Kameleoon goal id for a lead. Find it in Kameleoon under Goals. An event whose goal id is not set here (or sent as properties.kameleoon_goal_id) is not sent. |
Configure in Signal
Add the integration
Go to Integrations > Add Integration > Kameleoon.
Choose a preset
Default, Ecommerce / Retail or Lead Generation.
Enter the configuration
Fill in the fields in the table above.
Select consent categories
Choose the categories that gate experimentation analytics, typically analytics.
Save
Signal delivers the next matching event.
API Endpoint
POST https://{eu|na}-data.kameleoon.io/visit/events?siteCode=SITE_CODE&json=true
Content-Type: application/jsonA JSON array of events, batched. Kameleoon makes authentication optional for this endpoint.
Identity Signals
| Signal | Sent as | Notes |
|---|---|---|
| Visitor code | visitorCode | From collected_ids.kameleoon_visitor_code. Required: without it a conversion cannot reach the experiment visitor. |
| Nonce | nonce | 16 hexadecimal characters from the event’s message id; a retry reuses it. |
Event Mapping
Default preset (default)
Page views as PAGE events and the key conversions (order, refund, sign-up, lead) as CONVERSION events with goalId and revenue. visitorCode is the Kameleoon visitor code from the kameleoonVisitorCode cookie (collected_ids.kameleoon_visitor_code; a visitor without it is not sent): without it a conversion cannot be tied to the visitor’s experiment exposure, and a made-up code would count as a new unique visitor. nonce is 16 hex characters derived from the event’s message id, so a retry reuses it. Each conversion needs its Kameleoon goal id: set it per goal in the integration config or send properties.kameleoon_goal_id; an event whose goal is not set is not sent.
| Signal event | Sent as | Enabled |
|---|---|---|
page | PAGE | Yes |
purchase | CONVERSION | Yes |
refund | CONVERSION | Yes |
sign_up | CONVERSION | Yes |
generate_lead | CONVERSION | Yes |
Ecommerce / Retail preset (ecommerce)
Retail experiment goals: page views, add to cart, checkout start, order (revenue) and refund (negative conversion that removes the order’s revenue). visitorCode is the Kameleoon visitor code from the kameleoonVisitorCode cookie (collected_ids.kameleoon_visitor_code; a visitor without it is not sent): without it a conversion cannot be tied to the visitor’s experiment exposure, and a made-up code would count as a new unique visitor. nonce is 16 hex characters derived from the event’s message id, so a retry reuses it. Each conversion needs its Kameleoon goal id: set it per goal in the integration config or send properties.kameleoon_goal_id; an event whose goal is not set is not sent.
| Signal event | Sent as | Enabled |
|---|---|---|
page | PAGE | Yes |
add_to_cart | CONVERSION | Yes |
begin_checkout | CONVERSION | Yes |
purchase | CONVERSION | Yes |
refund | CONVERSION | Yes |
Lead Generation preset (lead_gen)
Lead-generation experiment goals: page views, leads (with estimated value) and sign-ups. visitorCode is the Kameleoon visitor code from the kameleoonVisitorCode cookie (collected_ids.kameleoon_visitor_code; a visitor without it is not sent): without it a conversion cannot be tied to the visitor’s experiment exposure, and a made-up code would count as a new unique visitor. nonce is 16 hex characters derived from the event’s message id, so a retry reuses it. Each conversion needs its Kameleoon goal id: set it per goal in the integration config or send properties.kameleoon_goal_id; an event whose goal is not set is not sent.
| Signal event | Sent as | Enabled |
|---|---|---|
page | PAGE | Yes |
generate_lead | CONVERSION | Yes |
sign_up | CONVERSION | Yes |
To customise, edit the integration’s Field Mappings in the Management UI.
Example: an order
What Signal sends (rendered from the preset):
POST https://eu-data.kameleoon.io/visit/events?siteCode=f17c21u1ag&json=true[
{
"eventType": "CONVERSION",
"goalId": 36151,
"nonce": "2885d85b9daa4dd4",
"revenue": 279.98,
"visitorCode": "245fcabc1234"
}
]Testing
Send a test event
Trigger the event on your site, or replay one from Signal’s event debugger.
Check the response
Confirm a 2xx response, then check the conversion on the visitor (Data API GET /visit/visitor) or in the experiment report.
Troubleshooting
| Problem | Solution |
|---|---|
| Conversions not sent | Set the goal id for that conversion in the integration. |
| 404 | Check the region. |
Limitations
- Projects hosted on
kameleoon.eudata domains cannot be selected yet: the endpoint useskameleoon.io(#1543). - Signal does not authenticate to the Data API, so the per-IP rate limit for unauthenticated requests applies.