Adding the script
The fastest way to add Userplane is the CDN embed. Add these two tags to the<head> of your index.html:
npm SDK
Use the npm SDK when you need programmatic control — triggering recordings from a button, attaching user metadata, or reading recording state.Installation
Initialization
Create a Vue plugin insrc/plugins/userplane.ts and register it in main.ts via app.use().
The
install function runs after the app is created and before mounting, which is a browser-only
context in a Vite Vue app. No SSR guards are needed here.URL parameters
When a customer opens a recording link, Userplane appendsuserplane-token and userplane-action to the URL. If Vue Router redirects users to a login page before they reach the target route, preserve the userplane- prefixed parameters through the redirect:
Sensitive data
Adddata-userplane-blur to any element you want blurred in recordings. See Sensitive Data Redaction for the full reference.
Metadata
Callset() inside the plugin’s install function, or anywhere in your app after initialization:
Example app
A complete Vue 3 example is available at github.com/wizenheimer/userplane-sdk-examples/tree/main/examples/vue.| Variable | Description |
|---|---|
VITE_USERPLANE_WORKSPACE_ID | Your Userplane workspace ID |
Related articles
- Installation — CDN script placement, CSP, and redirect handling.
- Web SDK — full SDK API reference.
- Metadata SDK — attach user context to recordings.
- Sensitive Data Redaction — blur sensitive content in recordings.