Install the Userorbit browser SDK once in your application. Use the installation settings for the workspace that should receive the data.

Choose an installation guide

Open Settings → Widget and copy the snippet or Account ID for the widget you intend to install. Choose the guide that matches your application:

Application Guide
Plain JavaScript or script snippet JavaScript installation
React React installation
Next.js Next.js installation
Vue Vue installation

These guides use the browser SDK. In a server-rendered application, run browser initialization from the client-side entry point described by the framework guide. Installing a package on a server does not record that server's DOM or create a browser session replay.

Initialize and identify

Load the bundle from your workspace snippet, or use the userorbit-js package. Initialize with the correct Account ID. When your application knows the signed-in user, use a stable opaque user ID. Email and name are optional; send only attributes your use case needs.

import userorbit from "userorbit-js";

await userorbit.init({
  accountId: "YOUR_ACCOUNT_ID",
  userId: "test-user-123",
});
JavaScript

The example uses a synthetic user. Use your application's real stable identifier in the integration. An initialization promise alone is not proof that requests reached Userorbit. Verify the result below.

For identity changes and method semantics, read User identity API reference. For data minimization and replay selectors, read pseudonymous IDs and replay masking.

Verify the installation

  1. Load the test page and inspect the browser Console and Network panels for load or initialization errors.
  2. For a snippet install, confirm the expected Userorbit script loads. For a package install, confirm the client-side initialization executes.
  3. If you identify the test user, check the expected contact in the correct workspace.
  4. Create the matching code action before testing a custom event, then confirm the activity in the intended Analytics project using Live Events.
  5. Test navigation in your application. Do not add duplicate route-change tracking merely because a page is a single-page application; follow the framework guide and check the events first.
  6. If you enable Session Replay, separately verify recording eligibility, privacy settings and playback using synthetic data.

For failures, use SDK troubleshooting.

Was this helpful?