Adding the script
The fastest way to add Userplane is the CDN embed. Add these two tags to the<head> of src/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 an initializer factory and register it withAPP_INITIALIZER in your app config. Angular calls APP_INITIALIZER providers during bootstrap, before the first component renders.
environment.ts with environment.prod.ts for production builds automatically.
URL parameters
When a customer opens a recording link, Userplane appendsuserplane-token and userplane-action to the URL. If your app uses route guards that redirect unauthenticated users, 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 initializer factory after initialize():
Example app
A complete Angular example is available at github.com/wizenheimer/userplane-sdk-examples/tree/main/examples/angular.| Variable | Description |
|---|---|
USERPLANE_WORKSPACE_ID | Your Userplane workspace ID (set in environment.ts) |
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.