identify()
Associates a user ID with the current user for analytics and user tracking.
Call this method after a user logs in to track their subscription status and user attributes across devices.
Purpose
Associates a user ID with the current user to enable cross-device tracking and user-specific analytics.
Signature
Parameters
Name | Type | Description |
---|---|---|
userId | String | A unique identifier for the user. |
options | IdentityOptions? | Optional configuration for identity behavior. |
Returns / State
Returns a Future<void>
that completes when the user identification is finished.
Usage
Basic identification:
After user login:
With error handling:
How is this guide?