-
Notifications
You must be signed in to change notification settings - Fork 8
Tracking via the JSON API
Arnaud PICHERY edited this page Oct 19, 2018
·
3 revisions
For tracking from custom applications, you can use the raw JSON API of WT1.
The API is available on the /public/events
mount point. It accepts JSON POST requests.
The JSON message must following the following structure:
{
"visitorId" : "Visitor id (arbitrary string)",
"sessionId" : "Session id (arbitrary string)",
"vparams" : "Query-string-encoded visitor params",
"sparams" : "Query-string-encoded session params",
"ua" : "User-agent, string identifying the generating application",
"clientLang" : "ISO code of the client language",
"events" : [
/* List of events in this tracking request */
{
"type" : " 'page' or 'event'",
"clientTS" : 1230123103, /* ms since Epoch */
"page" : "arbitrary string identifying the original 'location' of the event",
"params": "Query-string-encoded event params"
}
]
}
When using the API, you are responsible for supplying the visitor id and session id.