Install Userorbit in a browser application with the current snippet from your workspace.

Get the snippet

Open Settings → Widget installation and copy the HTML snippet for the current workspace. It loads https://cdn.userorbit.com/userorbit.umd.cjs asynchronously and initializes the workspace Account ID.

Identify after login

await window.userorbit.identify(currentUser.id, {
  email: currentUser.email,
  name: currentUser.name,
  attributes: { plan: currentUser.plan },
});JavaScript

Track an event

await window.userorbit.track("feature_used", {
  hiddenFields: { feature: "analytics" },
});JavaScript

Sign out and verify

Call window.userorbit.logout() on sign-out. Confirm window.userorbit exists, inspect Network requests, and find the test contact in Userorbit.

Was this helpful?