Quick start

Track an event in under a minute.

The Event Tracking API ingests event beacons from your application, validates each payload against the event types reference, enriches it with server-side context, and publishes it for processing.

Track an event

Make a POST request to /client/web/track with the event envelope:

1234567891011121314151617
const response = await fetch('https://api.croct.io/client/web/track', {  method: 'POST',  headers: {    'Content-Type': 'application/json',    'X-App-Id': '<APP ID>',    'X-Client-Id': '<CLIENT ID>',  },  body: JSON.stringify({    originalTime: Date.now(),    departureTime: Date.now(),    context: {url: 'https://example.com/home'},    payload: {      type: 'pageOpened',      url: 'https://example.com/home',    },  }),});

A successful request returns 204 No Content with an empty body.

See the endpoint reference for more details.