Installation
Add the following to the<head> of every page where you want recordings to work:
YOUR_WORKSPACE_ID with your workspace ID. You can copy the exact snippet with your ID pre-filled from Workspace Settings > Domains in the Userplane dashboard.
Script placement
The<script> tag should be placed as early as possible in the <head> of your page.
The Userplane script can only capture console logs and network requests that occur after it initializes. Placing it early ensures you capture as much context as possible from the start of the session.
Domains and subdomains
You need the Userplane script installed on each domain you want to record on. Recordings have access only to captured events from pages on the same domain that initiated the recording. In most cases, a script installed on the root domain will also capture events from subdomains. For example, a script onexample.com can see events from pages on app.example.com.
Safari exception: On Safari, events are only captured if the recording page and the script are
on the same subdomain. A script on
example.com will not see events from app.example.com in
Safari. If Safari support is important to you, install the script on each subdomain separately.Handling redirects
When a customer opens a recording link, Userplane appends query parameters to the URL — most importantlyuserplane-token and userplane-action. These parameters tell the SDK what recording session to start.
If your application redirects users from the recording URL — for example, redirecting unauthenticated users to a login page — you need to persist these query parameters through the redirect. If the parameters are lost during the redirect, the recording session cannot start.
All userplane- prefixed query parameters should be carried through:
userplane-token— the recording session token (required)userplane-action— the action type, e.g.recording(required)userplane-workspace— the workspace IDuserplane-meta— encoded metadata attached to the recording link
USERPLANE_URL_PARAMS from the SDK — it exports the canonical array of all parameter names:
Example: preserving params through a login redirect
Content-Security-Policy
If your site does not set CSP directives, you can skip this section. If your site specifiesContent-Security-Policy directives via a header or <meta> tag, a frame-src or script-src directive that does not include *.userplane.io will block the Userplane script from working correctly.
Modify your CSP to allow *.userplane.io as both a script source and frame source:
Iframes
If the Userplane script is installed inside an iframe, it will only capture events from within that iframe. Top-level page events (console logs, network requests) will not be captured. For full capture coverage, install the script on the top-level page. If your application runs inside an iframe on another site (e.g. embedded widgets or Shopify apps), be aware that top-level logs will not be captured.Browser support
The Userplane script works in all modern browsers:| Browser | Log capture support |
|---|---|
| Chrome | Fully supported (including Incognito) |
| Firefox | Fully supported (including Private Browsing) |
| Safari | Supported in standard windows. Private Browsing windows are not currently supported. |
| Edge | Fully supported (including InPrivate) |
Multiple workspaces
If you need to associate a single domain with multiple workspaces, you can add multiple meta tags:Verifying installation
Check the console
Open the browser’s developer console. Look for Userplane initialization messages confirming the
script loaded.
Related articles
- Domain Verification Guide — verify domain ownership after installing the script.
- Web SDK — programmatic SDK integration for advanced use cases.
- Sensitive Data Redaction — configure blur to protect sensitive content in recordings.
- Domain Recording Preferences — control what data is captured per domain.