Initialize the Userorbit browser SDK with an account ID, then send named product events.

Initialize

~js import userorbit from "userorbit-js";
await userorbit.init({ accountId: "YOURACCOUNTID", analytics: { enabled: true }, });
~
For a known user, include identity fields during initialization or call identify:
~js await userorbit.identify("user123", { email: "person@example.com", name: "Avery Chen", attributes: { plan: "growth" }, }); ~

Track an event

~js await userorbit.track("Workspace Created"); ~
Use consistent names, track completed actions, and avoid sending secrets or unnecessary personal data.
Open Analytics > Live Events in the correct project, perform the action, and inspect the received event.

Was this helpful?