> ## 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.

# Checking experimentation exposure, custom data, and conversion events

> Query the Data API to verify that experiment exposure, custom data, and conversion events have been ingested for a given visitor.

Kameleoon’s Data API is a REST API that offers several functionalities, including [storing and retrieving data specific to external users](./storing-and-retrieving-external-data-to-target-users) and [managing offline goal conversions](./processing-offline-goal-conversions-in-experiments). 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](/api-reference/visit/get-visitor-data) 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:

* **[Experiment exposure events](#experiment-exposure)**
* **[Custom data events](#custom-data)**
* **[Conversion events](#conversion)**

## Event parameters

As mentioned above, all requests must be made to the [Data API’s GET visit/visitor endpoint](/api-reference/visit/get-visitor-data) .

Standard parameters for **Experiment exposure**, **Custom data**, and **Conversion** event requests include:

Either:

* **visitorCode (string)**: Kameleoon’s unique ID for a visitor. ***Required if `mappingValue` is not provided.***

OR

* **mappingValue (string)**: Value of the custom data configured as a mapping identifier (acting as a visitor cross-device ID) if applicable. ***Required if `visitorCode` is not provided.***

* **siteCode (string)**: A unique string of letters and numbers that identifies a Kameleoon project. Retrieve this code via [this link](/user-manual/faq#how-do-i-find-my-sitecode).

* **currentVisit (string | optional)**: Set to `true` to 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`: either `experiment`, `customdata`, or `conversion`, as demonstrated in the examples below.

## Event requests

Below are examples of the format used for requests and replies, specific to each event:

<Important>
  The domain used in the query depends on geographical location: use `eu-data.kameleoon.(eu|io)` for Europe and `na-data.kameleoon.(eu|io)` for North America.
</Important>

<Note>
  For a more user-friendly output, include the parameter `prettyPrint=true` in the request header.
</Note>

### Experiment exposure

***Request***

```shell theme={null}
curl -X GET 'https://eu-data.kameleoon.io/visit/visitor?siteCode=f17c21u1ag&visitorCode=245fc&currentVisit=true&maxNumberPreviousVisits=20&experiment=true'
```

***Response***

```shell theme={null}
{
	"previousVisits": [
    	{
        	"siteCode": "f17c21u1ag",
        	"visitorCode": "245fc",
        	"timeStarted": 1748912914969,
        	"timeLastEvent": 1748912914969,
        	"experimentEvents": [
                {
                    "itp": false,
                    "tabId": -218793282,
                    "time": 1748977476606,
                    "data": {
                       "id": 250830,
                       "variationId": 978588
                    }
                }
            ]
    	}
	]
}

```

<Note>
  In 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.
</Note>

### Custom data

***Request***

```shell theme={null}
curl -X GET 'https://eu-data.kameleoon.io/visit/visitor?siteCode=f17c21u1ag&visitorCode=245fc&currentVisit=true&maxNumberPreviousVisits=20&customdata=true'
```

***Response***

```shell theme={null}
{
	"previousVisits": [
    	{
        	"siteCode": "f17c21u1ag",
        	"visitorCode": "245fc",
        	"timeStarted": 1748912914969,
        	"timeLastEvent": 1748912914969,
        	"customDataEvents": [
                "itp": false,
                "tabId": 51426880,
                "time": 1748978024982,
                "data": {
                   "index": 1,
                   "valuesCountMap": {
                      "true":1
                      },
                    "overwrite": true,
                    "mappingIdentifier": false
                },
                "itp": false,
                "tabId": 51426880,
                "time": 1748978024982,
                "data": {
                   "index": 3,
                   "valuesCountMap": {
                      "1": 1},

                },
                "overwrite": false,
                "mappingIdentifier": false
            ]
    	}
	]
}

```

<Note>
  In the example response, `index` is the unique ID of the custom data.
</Note>

### Conversion

***Request***

```shell theme={null}
curl -X GET 'https://eu-data.kameleoon.io/visit/visitor?siteCode=f17c21u1ag&visitorCode=245fc&currentVisit=true&maxNumberPreviousVisits=20&conversion=true'
```

***Response***

```shell theme={null}
{
	"previousVisits": [
    	{
        	"siteCode": "f17c21u1ag",
        	"visitorCode": "245fc",
        	"timeStarted": 1748912914969,
        	"timeLastEvent": 1748912914969,
        	"conversionEvents": [
            	{
                	"itp": false,
                	"time": 1748912914969,
                	"data": {
                    	"goalId": 361517,
                    	"revenue": 23.5,
                    	"negative": false,
                    	"metadata": {}
                	}
            	}
        	]
    	}
	]
}

```
