Skip to main content

Install @oxvo/browser and capture your first session

This guide gets @oxvo/browser live with a production-safe baseline.

Before you install

  • You have a valid siteKey for the target environment.
  • Your app can reach the Sessions ingestion endpoint.
  • Your site runs on HTTPS in production.

Note: By default, the SDK uses https://api.oxvo.com/oxvo. Set endpoint only when your environment requires a custom host.

Install the browser SDK

Tip: Need a no-build path for static templates or CMS pages? Use Install with direct script tag.

npm i @oxvo/browser

Install the OXVO Sessions snippet in your app shell

Use one of the two supported initialization styles.

import { browser } from '@oxvo/browser';

browser.configure({
siteKey: 'YOUR_SITE_KEY',
endpoint: 'https://sessions.example.com/oxvo', // optional if you use the default OXVO endpoint
devAllowInsecure: false,
});

const result = await browser.start({
userID: 'user_42',
metadata: {
plan: 'pro',
environment: 'production',
},
});

if (!result.success) {
console.error('Session capture not started:', result.reason);
}
import Browser from '@oxvo/browser';

const browser = new Browser({
siteKey: 'YOUR_SITE_KEY',
endpoint: 'https://sessions.example.com/oxvo',
devAllowInsecure: true, // set true only for local development
});

const result = await browser.start({
userID: 'user_42',
metadata: {
plan: 'pro',
environment: 'staging',
},
});

if (!result.success) {
console.error(result.reason);
}

Verify session capture

  1. Load your app in a new browser tab.
  2. Complete a short flow (for example: landing page -> product page -> checkout step).
  3. Confirm result.success === true from start().
  4. Open the session URL from the SDK:
const replayUrl = browser.getSessionLink();
console.log('Replay URL:', replayUrl);
  1. Confirm events and user interactions are visible in the replay timeline.

Warning: If you call browser.start() on the server (SSR runtime), capture will fail. Start only after client mount.

First browser session capture verification

Continue to runtime controls