Skip to Content

Events

Wire format for telemetry events streamed from the client SDK.

Event message

{ "type": "client.events", "clientSeq": 42, "events": [ { "type": "navigation", "ts": 1704067200000, "source": "client", "payload": { "url": "https://example.com/dashboard", "isMainFrame": true } } ] }

clientSeq

The clientSeq field is a monotonically increasing sequence number for deduplication. The session actor tracks the last seen clientSeq and ignores events with a lower or equal sequence number.

Event types

{ "type": "navigation", "payload": { "url": "https://example.com/page", "isMainFrame": true } }

net.request

{ "type": "net.request", "payload": { "requestId": "req_1", "url": "https://api.example.com/data", "method": "GET" } }

net.response

{ "type": "net.response", "payload": { "requestId": "req_1", "url": "https://api.example.com/data", "method": "GET", "status": 200, "durationMs": 150 } }

console

{ "type": "console", "payload": { "level": "log", "args": ["Hello world"] } }

error.uncaught

{ "type": "error.uncaught", "payload": { "message": "TypeError: Cannot read property 'x' of null", "stack": "..." } }

performance

{ "type": "performance", "payload": { "entries": [ { "name": "first-contentful-paint", "entryType": "paint", "startTime": 1200, "duration": 0 } ] } }

page.snapshot

HTML snapshot of the current page, captured on navigation or on demand.

{ "type": "page.snapshot", "payload": { "url": "https://example.com/page", "title": "Page Title", "html": "<html>...</html>" } }

page.screenshot

Screenshot of the webview, captured periodically or on demand.

{ "type": "page.screenshot", "payload": { "url": "https://example.com/page", "title": "Page Title", "data": "<base64-encoded image>", "width": 390, "height": 844 } }

user.interaction

User interaction events (click, focus, submit, scroll) captured by the interaction injection script.

{ "type": "user.interaction", "payload": { "action": "click", "selector": "button.submit-btn", "tag": "BUTTON", "text": "Submit", "url": "https://example.com/form", "x": 195, "y": 420 } }
FieldTypeDescription
action"click" | "focus" | "submit" | "scroll"Interaction type
selectorstringCSS selector path to the element
tagstringHTML tag name (e.g. "BUTTON", "INPUT")
textstring?Visible text content (truncated)
urlstringPage URL when interaction occurred
x, ynumber?Click coordinates (click only)
scrollTop, scrollLeftnumber?Scroll position (scroll only)

Storage

Events are persisted with sequence number, timestamp, server timestamp, source, type, and JSON payload.

Next steps

Last updated on