Ingest Event
Send a pageview or custom event from the tracking script.
Ingest Event
The primary data ingestion endpoint used by the EngageTrack tracking script. Receives pageview and custom event payloads.
This endpoint is called automatically by the tracking script. You typically don't need to call it directly unless building a custom integration.
Endpoint
POST /api/v1/event
No Bearer token required — the site is identified by the site_id field (the site's public ID).
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
site_id | string | Yes | Site public ID (pk_live_*) |
event_type | string | No | pageview, click, form_submit, download, outbound, purchase, custom |
url | string | Yes | Full page URL |
event_name | string | No | Custom event name (for custom events) |
referrer | string | No | Referrer URL |
title | string | No | Page title |
visitor_uid | string | No | Persistent visitor ID from localStorage |
session_id | string | No | Client-side session ID |
screen_w | number | No | Screen width |
screen_h | number | No | Screen height |
time_on_page | number | No | Seconds spent on previous page |
scroll_depth | number | No | Max scroll percentage (0-100) |
revenue | number | No | Revenue amount (for purchase events) |
currency | string | No | Currency code, e.g. USD |
order_id | string | No | Order ID (for purchase events) |
properties | object | No | Custom key-value properties |
Response
Returns 202 Accepted with body ok on success.
Identify Endpoint
To link an anonymous visitor to a known user identity:
POST /api/v1/identify
| Field | Type | Required | Description |
|---|---|---|---|
site_id | string | Yes | Site public ID |
visitor_uid | string | Yes | Visitor UID from tracker |
user_id | string | Yes | Your application's user ID |
name | string | No | User display name |
email | string | No | User email |
avatar | string | No | Avatar URL |
custom | object | No | Custom attributes |