initialize().
This lets you control rollout from your existing feature flag system (LaunchDarkly, PostHog, Statsig, etc.) without code changes at each stage.
How it works
- Set
shouldDeferInitializationon the provider (React) or delay callinginit()(vanilla JS) - Wait for your feature flag to resolve
- Call
initialize()only when the flag is enabled
- React
- Script Tag
initialize() is idempotent — calling it more than once has no effect after the first successful call.Checking initialization state
- React
- Script Tag
Queuing
Calls totrackEvent() and update() made before initialization completes are automatically queued and replayed once recording starts. You don’t need to wait for isInitialized before calling them.