Overview
reset() clears the current user identity set by identify(). Call it when a user logs out to prevent their events from being mixed with the next user’s events on the same device.
Signature
Parameters
None.reset() takes no arguments.
Example
When to call it
Always callreset() when a user logs out:
What it clears
Why this matters
If you don’t callreset() on logout:
- User A logs out
- User B logs in on the same browser
- User B’s events are attributed to User A’s identity on the dashboard
reset() prevents this by wiping User A’s identity from both memory and localStorage.