Skip to main content
GET
/
visit
/
visitor
Get visitor data
curl --request GET \
  --url https://eu-data.kameleoon.io/visit/visitor

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.

Query Parameters

siteCode
string
required

The Kameleoon project ID.

currentVisit
boolean
default:false

Set to true to get data for the current visit. Note: It is strongly recommended to provide the visitorCode parameter. If not, Kameleoon uses the last visitor code associated with the provided mappingValue to retrieve the visit.

maxNumberPreviousVisits
integer<int32>
required

The maximum number of previous visits to return. Note: If you provide the mappingValue parameter, Kameleoon performs cross-device reconciliation of previous visits. Otherwise, Kameleoon uses the provided visitorCode.

visitorCode
string

The visitor code (a unique Kameleoon ID for a visitor). Note: This is required if you do not provide the mappingValue parameter.

mappingValue
string

The value of the custom data configured as a mapping identifier (acts as a cross-device ID). Note: This is required if you do not provide the visitorCode parameter.

all
boolean
default:false

Set to true to get all available data for a visitor.

staticData
boolean
default:false

Set to true to get static data events (browser, browser version, device type, OS) for a visitor. Note: Kameleoon ignores this if the all parameter is true.

page
boolean
default:false

Set to true to get page data events (URLs viewed) for a visitor. Note: Kameleoon ignores this if the all parameter is true.

conversion
boolean
default:false

Set to true to get conversion events for a visitor for goals you have set up in your Kameleoon account. Note: Kameleoon ignores this if the all parameter is true.

targetingSegment
boolean
default:false

Set to true to get targeted segment IDs for a visitor. Note: This requires the Kameleoon Audiences Explorer add-on or the Kameleoon AI-Driven Personalization package. Kameleoon ignores this if the all parameter is true.

experiment
boolean
default:false

Set to true to get targeted experiment IDs and variation IDs for a visitor. Note: Kameleoon ignores this if the all parameter is true.

weather
boolean
default:false

Set to true to get weather conditions data (temperature, humidity, pressure...) collected by Kameleoon. Note: Kameleoon ignores this if the all parameter is true.

customData
boolean
default:false

Set to true to get custom data events for a visitor. Note: You can only retrieve custom data not set as "local". Kameleoon ignores this if the all parameter is true.

product
boolean
default:false

Set to true to get product events (product EANs viewed) for a visitor. Note: Kameleoon ignores this if the all parameter is true.

personalization
boolean
default:false

Set to true to get the targeted personalization IDs and variation IDs for a visitor. Note: Kameleoon ignores this if the all parameter is true.

geolocation
boolean
default:false

Set to true to get geolocation data (country, region, city, postal code, latitude...) for a visitor. Note: Kameleoon ignores this if the all parameter is true.

prettyPrint
boolean
default:false

Set to true for a "pretty" printed response.

Response

Successful operation, youngest visits are rendered, of type JSON object {"currentVisit": <current visit>, "previousVisits": <previous visits>}, with <current visit> of type <visit>, <previous visits> of type JSON array of <visit> and with <visit> = JSON object ("currentVisit" optional key)