Kameleoon’s Data API is a REST API that offers several functionalities, including storing and retrieving data specific to external users and managing offline goal conversions. Use the Data API to determine whether Kameleoon has received visit events sent automatically by Kameleoon or through the Activation API or SDK methods. This article explains how to use the Data API’s GET visit/visitor endpoint to check if specific event types have been ingested by Kameleoon. This verification is particularly useful when testing tracking code. The following sections explain how to check these events programmatically:Documentation Index
Fetch the complete documentation index at: https://docs.kameleoon.com/llms.txt
Use this file to discover all available pages before exploring further.
Event parameters
As mentioned above, all requests must be made to the Data API’s GET visit/visitor endpoint . Standard parameters for Experiment exposure, Custom data, and Conversion event requests include: Either:- visitorCode (string): Kameleoon’s unique ID for a visitor. Required if
mappingValueis not provided.
-
mappingValue (string): Value of the custom data configured as a mapping identifier (acting as a visitor cross-device ID) if applicable. Required if
visitorCodeis not provided. - siteCode (string): A unique string of letters and numbers that identifies a Kameleoon project. Retrieve this code via this link.
-
currentVisit (string | optional): Set to
trueto receive data related to current visits. Only users utilizing Feature Experimentation can request data for active visits. -
Depending on the specific event requested, each request must include one additional boolean parameter set to
true: eitherexperiment,customdata, orconversion, as demonstrated in the examples below.
Event requests
Below are examples of the format used for requests and replies, specific to each event:For a more user-friendly output, include the parameter
prettyPrint=true in the request header.Experiment exposure
RequestIn the example response,
id represents the ID for the experiment, while variationId is the specific variation of the experiment that the visitor is exposed to.Custom data
RequestIn the example response,
index is the unique ID of the custom data.