14Reference
Collect API: the endpoint behind the script
The script sends a tiny JSON payload to POST /api/collect. You can also call it directly from native apps or server-side code.
| Field | Type | Description |
|---|---|---|
| s | string | Your site ID, e.g. site_k3v9x2m4q1 (required) |
| u | string | Full page URL, including query string (required) |
| r | string | document.referrer, may be empty |
| w / h | number | Screen width and height in pixels |
| e | string? | Custom event name — omit for a pageview |
| p | object? | Event properties (strings, numbers, booleans) |
| t | string? | "click" for auto-tracked clicks — requires a paid plan |
The endpoint always answers 202 so analytics can never break your page. Device, browser, country and traffic-quality signals are derived server-side; the visitor identifier is a salted hash that rotates monthly — no cookies, no raw IP stored.