Listing replays?
A replay consists of multiple segments sharing one replay_id. Filter for segment_id = 0 to get one row per replay.
Query your web events and session replays outside of Better Stack with ClickHouse SQL over a read-only HTTP API. Build custom reports, feed BI tools, or export data programmatically.
The full setup, output formats, query limits, and optimization tips are covered in the SQL API guide. This page covers what's specific to real user monitoring data.
Each application exposes its real user monitoring data as separate collections. Find the exact identifiers on your connection's card under Query with in Integrations:
remote(t123456_your_app_web_events) for recent web events: page views, clicks, form interactions, and custom events.remote(t123456_your_app_replays) for recent session replay metadata.s3Cluster(primary, t123456_your_app_s3) for historical data. Filter with _row_type = 8 for web events and _row_type = 6 for replays.Event details live in the raw JSON column. Use JSONExtract functions to access fields.
Common top-level fields in the raw JSON of a web event:
| Field | Description |
|---|---|
event |
Event type, such as page-load, page-change, click, or a custom event name. |
dt |
Capture time as a Unix timestamp in milliseconds. |
session_id |
Session identifier. |
anonymous_user_id |
Stable anonymous visitor identifier. |
user |
Identified user object, present when betterstack('user', ...) was called, such as user.email and user.id. |
fingerprint |
Array with the v1_<hash> browser fingerprint, present when fingerprinting is enabled. |
payload |
Event-specific data. Autocapture events nest page details under payload.meta, such as payload.meta.url, payload.meta.title, and payload.meta.referrer. |
contexts |
Browser, operating system, and device, added during ingestion: contexts.browser.name, contexts.client_os.name, and contexts.device.type. |
See JavaScript tag events for the full per-event schema.
A replay consists of multiple segments sharing one replay_id. Filter for segment_id = 0 to get one row per replay.
We're here for you! Let us know at hello@betterstack.com and we'll be happy to help.
We use cookies to authenticate users, improve the product user experience, and for personalized ads. Learn more.