Developer Docs
Search…
Logout function
analytics.logout ()
This function is used to logout a user from client. A Login function request has to be made after to re-establish Account and User to be tracked.

Example

1
analytics.logout ()
Copied!
Don't use logout function as first call.
Since user_id or account_id is NOT stored in localStorage so the first logout call will simply do nothing.
It is in browser object memory, so on every browser page refresh we get new data.
Last modified 1yr ago
Copy link
Contents
Example