Skip to main content
This guide covers how to install Userplane in a Vue 3 application built with Vite.

Adding the script

The fastest way to add Userplane is the CDN embed. Add these two tags to the <head> of your index.html:
You can copy the snippet with your workspace ID pre-filled from Workspace Settings > Domains in the Userplane dashboard.

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 in src/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 appends userplane-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:
See Installation for the full list of parameters.

Sensitive data

Add data-userplane-blur to any element you want blurred in recordings. See Sensitive Data Redaction for the full reference.

Metadata

Call set() inside the plugin’s install function, or anywhere in your app after initialization:
See Metadata SDK for the full API.

Example app

A complete Vue 3 example is available at github.com/userplanehq/userplane-sdk-examples/tree/main/examples/vue.

Example app