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.
1. Prerequisites
- An active project in the Corbado management console
- Your
Project IDandAPI Base URLfrom settings
2. Install the SDK
- Web (npm)
- Web (CDN)
- iOS (Swift)
- Android (Kotlin)
3. Initialize the tracker
Initialize as early as possible in your app startup.- Web (npm)
- Web (CDN)
Multiple projects on web
Persisted state and cross-tab locks are scoped byprojectId. Keep a tracker for each project and send events through the intended instance:
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, sendflowStarted:
- Web (npm)
- Web (CDN)
5. Verify
Setdebug: true in your init() call while developing and Observe logs every tracked event to the console:
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.