Documentation Index
Fetch the complete documentation index at: https://docs.hacktionbase.com/llms.txt
Use this file to discover all available pages before exploring further.
Recording modes
The replay system operates in three modes:| Mode | Description |
|---|---|
| OFF | Replay is disabled or not started |
| BUFFER | rrweb captures events into a ring buffer (~30 seconds). Nothing is uploaded yet. |
| RECORDING | The buffer is flushed and new events are continuously uploaded in batches. |
Trigger events
Replay transitions from BUFFER to RECORDING when one of these events occurs:- Error — an unhandled JavaScript error or
console.errorcall - Widget open — the user opens the chat widget
Enabling replay
Session replay is controlled from the dashboard under Settings → Widget → Features. When enabled, the SDK automatically starts recording in buffer mode on initialization. No code changes are needed — the SDK reads thesessionReplay flag from your widget configuration.
Data handling
- Batches are gzipped using the browser’s native
CompressionStreamAPI before upload - Uploads use widget JWT authentication (obtained during the widget auth handshake)
- Batches include a sequence number for ordered playback
- If the upload quota is exceeded (HTTP 402/429), recording stops automatically
Privacy & masking
The SDK applies these privacy defaults:| Setting | Value |
|---|---|
maskAllInputs | true — all input values are masked |
maskTextSelector | [data-hb-mask] — add this attribute to mask specific text |
blockSelector | Widget elements and [data-hb-block] — excluded from recording |
recordCanvas | false — canvas elements are not recorded |
recordCrossOriginIframes | false — cross-origin iframes are skipped |
inlineImages | false — images are referenced by URL, not inlined |
Masking specific elements
Adddata-hb-mask to mask text content:
data-hb-block to exclude an element entirely:
GDPR opt-out
CalldisableReplay() to permanently stop session replay for the current user:
destroy() + init() is called again).
Use this to honor user privacy preferences or implement a “Do not record” toggle in your application.
