Skip to main content
Custom events are explicit Corbado Observe events you emit from your own code, at the semantically correct points in your flows. You get exactly the granularity you define. Budget 1 to 3 days for a typical login flow, plus your own testing.
On web, most teams run Autocapture as the foundation and add custom events only where a step needs guaranteed semantics. On iOS and Android, custom events are the integration. See Integration paths.
Prefer an AI coding agent? See Use with AI agents and let it instrument the integration for you.

1. Prerequisites

2. Install the SDK

3. Initialize the tracker

Initialize as early as possible in your app startup.

Multiple projects on web

Persisted state and cross-tab locks are scoped by projectId. Keep a tracker for each project and send events through the intended instance:
Each init() call also returns a tracker, but replaces the default used by package-level helpers such as getTracker(), resetSession() and destroy(). Constructing CorbadoTracker directly does not replace that default. Call methods on your retained instances and use await projectA.destroy() when that instance is no longer needed. With the CDN snippet, assign distinct names using Corbado.init(options, "projectA") and Corbado.init(options, "projectB"). Call Corbado.get("projectA") or Corbado.get("projectB") for each event. Instances with the same project ID share persisted state within the browser’s storage boundaries; names alone do not isolate storage.

Migrating existing project storage

When upgrading from an SDK that uses global storage, initialize your existing project first. The SDK copies legacy global storage into that project’s storage before loading configuration, resolving the session or recovering queued events. It preserves valid existing session IDs, sequence counters, experiment assignments, device identity and pending events; other projects start independently. Existing project-scoped state is preserved. Each tab migrates its own session storage when the original project initializes there. Migration is a one-time snapshot: legacy keys remain, but later writes from already-open pages running an older SDK are not imported again. Reload those pages to complete the upgrade. See session lifetime and storage and verify that each project’s events arrive separately.

4. Track your first event

When your login UI is rendered and visible, send flowStarted:
Use touchpoint consistently, for example account, checkout or modal, so you can compare funnel metrics across entry points.

5. Verify

Set debug: true in your init() call while developing and Observe logs every tracked event to the console:
Set debug: false in production. For the full verification workflow, including the Corbado Observe Debugger extension for Chrome DevTools, see Verify your integration.

6. Next steps

Model your journeys

Map your flows, decisions and subflows before writing tracking code.

Tracking reference

Flows, decisions, subflows, users and tags.

Verify your integration

Confirm events arrive before you ship.