Skip to main content
This guide covers how to install Userplane in a SolidJS 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 at the project root:
Replace 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. Vite serves index.html as the entry point for SolidJS SPAs, so any tags placed in <head> load before the application mounts. Place the tags as early as possible — the Userplane script can only capture console logs and network requests that occur after it initializes.

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 UserplaneProvider component and wrap your app with it in index.tsx.
SolidJS’s onMount runs once after the component mounts in the browser, making it the equivalent of React’s useEffect(() => {}, []). Because Vite SolidJS apps are client-side rendered, a static import at the top of the file works — no dynamic import() or SSR guards are needed.

SolidStart (SSR)

If you are using SolidStart (the SSR meta-framework), there is no raw index.html. Use a dynamic import() inside onMount to ensure the SDK only initializes in the browser:
Mount the provider in your root layout at src/app.tsx.
SolidJS does not yet provide a built-in <Script> component for head management. The @solidjs/meta package supports <Title>, <Meta>, and <Link> but not <Script>. Use onMount with document.createElement or the CDN embed in index.html instead.

URL parameters

When a customer opens a recording link, Userplane appends userplane-token and userplane-action to the URL. If your SolidStart app uses a middleware or route guard that redirects users, carry 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() after initialize() to attach user context to recordings:
See Metadata SDK for the full API.

Example app

A complete SolidJS example is available at github.com/userplanehq/userplane-sdk-examples/tree/main/examples/solid.

Example app