Skip to main content
The Observerbee SDK is a TypeScript browser library built on rrweb. It ships as ES module, CommonJS, and UMD builds, so it works with any bundler or directly from a script tag.

Package install

The package is @web-analytics-ai/obweb, hosted on GitHub Packages while Observerbee is in closed beta.
1

Point the scope at GitHub Packages

Add a .npmrc file to your project root:
.npmrc
GitHub Packages requires authentication to install. If your environment is not already logged in to npm.pkg.github.com, ask us for access during onboarding.
2

Install

3

Initialize

SessionRecorder.init(config) constructs a recorder and starts it in one call. If you need to separate construction from starting, use createSessionRecorder(config) and call start() yourself.

Script tag install

The UMD build exposes an Obweb global (with SessionRecorder and createSessionRecorder also available on window).
Pinned versions are available at /obweb/v<version>/obweb.min.js. The latest path tracks the newest release with a short cache.

Where to initialize

Initialize as early as possible in your application lifecycle, once per page:
  • React / Next.js: in your root layout or top-level client component, guarded so it runs once in the browser.
  • Vue / Nuxt: in a client-side plugin.
  • Plain HTML: in a <head> script, as shown above.
The SDK only runs in the browser. In server-rendered frameworks, make sure the init call executes client-side. Recording starts immediately when init is called, before the network handshake with the Observerbee backend completes, so you do not lose the first moments of a session. See Reliability.

Single-page applications

No router integration is needed. The SDK listens to the Navigation API where available and patches history.pushState / replaceState as a fallback, so client-side route changes are detected automatically and each route starts from a fresh DOM snapshot.

App version tagging

Sessions can be tagged with your app’s release version, which helps when comparing behavior across deploys. The SDK auto-detects a version from common conventions (Next.js and Nuxt build IDs, Sentry release globals, a data-version attribute on the obweb script tag, <meta name="version">, and common window globals such as __APP_VERSION__). To set it explicitly, pass appVersion in the configuration.