Install the Userplane SDK, configure metadata, set up domain verification, and control what gets captured
Userplane works without any code — but the SDK unlocks richer session data, custom metadata, and programmatic recording controls. This guide covers everything you need to integrate Userplane into your app.
Domain verification is required before your support team can create branded recording links on your domain. Userplane verifies ownership by checking that the embed script is present on your site.
The embed script from Step 1 is what Userplane checks for during verification. Make sure it is
deployed to a publicly accessible page — verification will fail if the page is behind a login
wall or not yet deployed.
3
Verify
Click Verify in the dashboard (or ask your workspace admin to do it). Verification runs
immediately. The verification token expires after 5 minutes, so trigger it once the script is
live.
Metadata lets you attach user and account context to every recording so your support team sees who the customer is without having to ask.
import { set } from '@userplane/sdk';// Call after your user is authenticatedset('userId', user.id);set('email', user.email);set('name', user.name);set('accountId', account.id);set('plan', account.plan);
Metadata appears in the Info tab of every recording from that user. See Metadata SDK for the full reference.
Use metadata() to capture values at recording submission time — useful for SPAs where context changes without a page reload:
import { set, metadata } from '@userplane/sdk';// Static values set once at loginset('userId', user.id);set('email', user.email);// Dynamic values captured fresh when the recording is submittedmetadata(() => ({ accountId: getCurrentAccount().id, plan: getCurrentAccount().plan, page: window.location.pathname,}));
See Sensitive Data Redaction for the full list of privacy controls — including CSS class and meta tag approaches, and third-party selector compatibility.
Once the SDK is installed, you can control recording sessions programmatically:
import { open, unmount, getRecordingState } from '@userplane/sdk';// Open the recording flowopen();// Close the recorderunmount();// Check current stateconst state = getRecordingState(); // 'inactive' | 'active' | 'retained'