Core Fields
| Field | Required | Description |
|---|---|---|
site_id | Yes | Tracking site identifier |
event_id | No | UUID for dedupe (auto-generated if omitted) |
event_time | No | Event timestamp (defaults to now) |
scan_session_id | Yes for /server-events | Links event to QR scan session |
consent | No | granted, denied, pending |
Browser Event Fields (/collect)
| Field | Required | Notes |
|---|---|---|
event_type | Yes | Example: pageview, click, form_submit |
page_url | No | Current URL |
page_title | No | Page title |
referrer | No | Referrer URL |
device | No | Browser/device context |
metadata | No | Max 10KB, max depth 5, no raw emails |
Server Event Fields (/server-events)
| Field | Required | Notes |
|---|---|---|
event_name | Yes | Example: purchase, signup, lead |
user_identifiers | No | Hashed IDs (email_hash, phone_hash, external_id) |
conversion_value | No | amount + currency |
properties | No | Max 10KB, no raw emails |
Idempotency and Dedupe
- Prefer sending a stable
event_idfrom your backend. - Re-sending the same
event_idhelps prevent duplicate counting downstream.
ClickHouse Storage Shape (events.valid_events)
The analytics pipeline stores/enriches event rows with fields such as:
| Column | Meaning |
|---|---|
event_id | Unique event UUID |
event_time | Client/server event timestamp |
received_time | Ingestion receive timestamp |
site_id | Tracking site identifier |
scan_session_id | Session for QR attribution |
qr_code_id | QR ID (resolved from session where available) |
user_id | User identity (resolved/enriched where available) |
event_type | Browser auto/custom type (for example click, pageview) |
event_name | Server/custom semantic name (for example purchase) |
source | browser or server |
page_url | Page URL |
referrer | Referrer URL |
device_type | Device class |
browser_family | Browser family |
os_family | OS family |
country_code | Country code |
city | City |
conversion_value | Numeric conversion amount |
conversion_currency | ISO currency code |
metadata | JSON metadata string |
is_duplicate | Duplicate marker (0/1) |
is_fraud | Fraud marker (0/1) |
Example Browser Event Row
Privacy Guardrails
- Do not send raw emails in browser metadata or server properties.
- Send hashed identifiers in
user_identifiersfor server events.