Before You Begin
You need:- A Confidence account with Recordings enabled
- A browser client secret for the environment you want to record
- Permission to create or edit a recording policy
- A recording policy with an active rule for your client. See recording rules.
Set Up the SDK
1
Install the package
2
Review the privacy controls
The SDK masks input values by default. Review privacy and data masking
before you enable recording in a production environment.
3
Initialize the recorder
Call
initSessionRecorder once, as early as possible when your app loads:clientSecretis a browser client secret for the environment you want to record.appVersionstores an application version or commit hash on the recording.contextholds custom dimensions. Confidence uses context to evaluate recording rules before capture starts, and you can filter recordings by it. Don’t add direct personal identifiers, access tokens, or secrets to context.debugLoggerprints[CSR]messages while you set up. Remove it before you ship.
4
Verify recording
Interact with the application, then check the recorder:A
false value doesn’t always indicate an error. A rule, sample rate, or account capacity can
exclude the session. The debug logger tells you when Confidence skips a session and why. To turn
on logging without changing code, run sessionStorage.setItem('CSR_DEBUG', 'true') in the browser
console and reload the page.5
Finish the test session
Close the test tab. If other tabs share the browser session, close those tabs too.
Each tab appears as a separate recording. Allow several minutes after the browser
session ends before you check Recordings.
Customize Recordings
Configure privacy
Mask or block sensitive content before it leaves the browser.
Configure recording rules
Control which users and sessions the SDK records.
Add custom data
Add context, tags, and measurements.
Parameterize routes
Group dynamic application routes.
Integrate feature flags
Keep recording and feature flag targeting context consistent.
Related Resources
Explore recordings
Learn what you can review in the Confidence UI.
Recordings SDK reference
Review all SDK options and methods.
Troubleshoot recordings
Diagnose SDK setup and capture problems.

