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 GitHub Packages requires authentication to install. If your environment is not already logged in to
.npmrc file to your project root:.npmrc
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 anObweb global (with SessionRecorder and createSessionRecorder also available on window).
/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.
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 patcheshistory.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, adata-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.