Session Replay
Session replay captures a DOM-level recording of user sessions using rrweb, letting you see exactly what users experienced before, during, and after an error. Recordings are stored in MinIO-compatible object storage.
Recording modes
Choose the recording mode that fits your privacy and storage requirements:
- Full recording -- captures the entire session from page load. Useful for UX research and conversion analysis. Subject to sample rate.
- Error-only recording -- captures a rolling buffer and only persists the recording when an error occurs. Includes configurable seconds of pre-error context.
SDK setup
Enable replay in the tracker initialization:
import { init } from '@gurulu/web';
init({
siteId: 'YOUR_SITE_ID',
token: 'YOUR_TOKEN',
replay: {
enabled: true,
mode: 'error-only', // 'full' | 'error-only'
bufferSeconds: 30, // seconds of pre-error context
maxSessionMinutes: 60, // max recording duration
sampleRate: 0.1, // 10% of sessions (full mode)
},
});Privacy masking
Session replay supports three privacy levels that control how sensitive content is handled in recordings:
- Strict -- all text content is replaced with asterisks. Input values are never recorded. Images are blocked.
- Balanced -- input values and elements matching mask selectors are masked. Other text content is recorded normally.
- Minimal -- only elements matching mask selectors are masked. All other content is recorded as-is.
init({
siteId: 'YOUR_SITE_ID',
token: 'YOUR_TOKEN',
replay: {
enabled: true,
mode: 'error-only',
privacyLevel: 'balanced',
maskSelectors: ['.credit-card', '[data-sensitive]'],
blockSelectors: ['.private-content'],
},
});MinIO storage
Replay recordings are stored in MinIO (S3-compatible object storage). Configure the storage backend in your deployment:
services:
minio:
image: minio/minio
environment:
MINIO_ROOT_USER: gurulu
MINIO_ROOT_PASSWORD: ${MINIO_PASSWORD}
volumes:
- replay-data:/data
command: server /data --console-address ":9001"
volumes:
replay-data:Recordings are compressed with gzip before upload. Average recording size is 200-500 KB per minute of session activity.
Playback controls
The replay viewer in the dashboard provides the following controls:
- Variable playback speed (0.5x to 4x)
- Skip inactivity periods automatically
- Console log overlay synchronized with playback timeline
- Network request waterfall aligned with user actions
- DOM element search to jump to specific interactions
Retention
Configure how long replay recordings are kept before automatic deletion:
{
"replay": {
"retentionDays": 30,
"maxStorageGb": 50,
"autoDeleteOnExpiry": true
}
}For privacy controls related to replay recording, see Consent & Privacy.