Docs

Recording

Automatic and manual recording modes

Last updated:

Auto Recording (Default)

By default, autoRecord: true starts recording immediately when init() is called. Every page visit generates a session that appears in your dashboard.

typescript
SessionSight.init({
  publicApiKey: 'YOUR_PUBLIC_API_KEY',
  propertyId: 'YOUR_PROPERTY_ID',
  // autoRecord: true is the default
});

Manual Recording

Set autoRecord: false to control exactly when recording starts. The SDK still initializes and captures into a rolling 5-second pre-buffer, but nothing is sent to the server until you call startRecording().

Manual recording
SessionSight.init({
  publicApiKey: 'YOUR_PUBLIC_API_KEY',
  propertyId: 'YOUR_PROPERTY_ID',
  autoRecord: false,
});

// Later, when something interesting happens:
document.getElementById('checkout-btn').addEventListener('click', () => {
  SessionSight.startRecording({ preRecordSecs: 5 });
});

Pre-Record Buffer

When using manual recording, you can include up to 5 seconds of activity that happened before startRecording() was called. This lets you see what led up to the trigger.

typescript
// Include the last 3 seconds of activity
SessionSight.startRecording({ preRecordSecs: 3 });

// Start from this moment only (no pre-buffer)
SessionSight.startRecording();
OptionTypeDefaultDescription
preRecordSecsnumber0Seconds of pre-buffered activity to include (max 5)

Use Cases for Manual Recording

  • Error flows: Start recording when an error is caught, including what the user was doing before
  • Specific funnels: Only record sessions that enter a checkout or signup flow
  • Sampling: Randomly record a percentage of sessions to reduce data volume
  • User-triggered: Let users opt in to being recorded (e.g., “Report a bug” button)

Pausing and Resuming

stopRecording() and resumeRecording() pause and resume rrweb capture without touching the session, the identity container, or consent. Goals, feedback, and split-test exposures continue to fire while paused. Use this for dynamic in-flow pauses (e.g. a modal with payment fields) when you want to keep the session alive but not record the visual.

In-flow pause
// Pause rrweb capture without touching the session, identity, or consent.
// Goals, feedback, and split-test exposures keep firing.
paymentModal.addEventListener('open', () => SessionSight.stopRecording());
paymentModal.addEventListener('close', () => SessionSight.resumeRecording());

This is orthogonal to consent. To fully stop collecting data (session, goals, everything), call SessionSight.setConsent(false) instead — see Consent.

What Gets Captured

DataCapturedNotes
DOM stateYesFull snapshot with inline CSS for replay
Mouse movementYesPosition sampled every 500ms
ClicksYesCoordinates + button/link labels
Scroll depthYesPosition sampled every 1s
Page navigationsYesSPA detected via History API
Form interactionsYesFocus/blur timing, filled state (boolean)
Form field valuesNoNever captured
PasswordsNoNever captured
Cookies / localStorageNoNever captured
Network requestsNoNot captured
Image, video, audio sourcesNoStripped by default; opt back in per element with data-ss-allow
Privacy by design
The SDK automatically detects and redacts PII (emails, phone numbers, credit cards, SSNs, and more) before data leaves the browser. You can also control masking at the element level with data attributes like data-ss-mask, data-ss-unmask, data-ss-exclude, and data-ss-allow. Field values, passwords, cookies, network data, and media sources are never part of a recording unless you explicitly opt in.