Embed script (zero-code)
The embed script is a single<script> tag you add to your site. It handles everything automatically — loading the recorder, parsing recording links, and managing cross-tab state.
npm SDK (programmatic)
The@userplane/sdk package gives you a JavaScript API for full control over the recording lifecycle. Use it when you need to:
- Trigger recordings from your UI — open the recorder from a button, menu, or support widget instead of relying on link clicks.
- Attach metadata — send user IDs, account info, feature flags, or session context alongside recordings so your support team has full context.
- Query recording state — check whether a recording is active, get the session ID, or read connection status to build custom UI.
Choosing the right path
| Embed script | npm SDK | |
|---|---|---|
| Setup | One <script> tag | npm install @userplane/sdk |
| Recording links | Work automatically | Work automatically |
| Programmatic open/close | No | Yes |
| Custom metadata | No | Yes |
| Recording state queries | No | Yes |
| Build step required | No | Yes |
Next steps
- Web SDK Reference — full API for initialization, recorder control, and state inspection.
- Metadata SDK Reference — attach custom key-value data to recordings.
- Installation — set up the embed script.
- Framework Guides — framework-specific integration instructions.