Skip to main content
POST
Track Visitors
Record anonymous visitor sessions and events. The tracking snippet from Capturing Leads via API calls this endpoint for you. Call it directly from your own backend or app if you do not use the snippet. Data is stored against the visitor first. This endpoint never creates a lead. If the visitor is already linked to a lead, their sessions and events are attached to that lead.

Request Body

string
required
A stable ID for the visitor, minted by you or the snippet.
object
array
Up to 50 events per request; more returns 400.
object
Identifiers used to recognize the same visitor later: ga4ClientId, cookie, deviceId, gclid, fbclid, gbraid, wbraid, fbp and fbc.
An event without an eventId or eventName is skipped and the rest of the batch is still accepted. Text fields are trimmed and capped at 256 characters (2048 for URLs).

Response

boolean
Indicates if the request was accepted.
object
This endpoint accepts an API Token (okt_...) or JWT. The account is taken from the token, never from the request body. It requires the crm_api feature and shares the 120 requests/minute limit. The script GET /api/v1/crm/track.js is public and needs no token.