Skip to main content

reset

Clears all cached state, user data, and session information, then re-initializes the SDK with the original configuration.

When to Use

Call reset() when:
  • A user logs out of your app
  • You need to switch between user accounts
  • You want to clear all onboarding progress and start fresh

What Gets Reset

  • User ID and device info
  • Session data
  • Event tracking state
  • Onboarding data cache
  • Transaction observer

Example

Notes

  • The SDK will automatically re-initialize after reset using the original configuration passed to init()
  • If init() was never called, reset() will log a warning and return without action
  • After reset, a new user ID will be generated and a fresh session will start