You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to reset Mixpanel (mixpanel.reset()) when a redirect to login is triggered due to an expired session. As I only initialize Mixpanel for authenticated users, the call to mixpanel.reset() fails as it runs before mixpanel.init(...) in this case.
That's how I currently work around this limitation by resetting Mixpanel immediately after initialization if the user ID has changed from what Mixpanel persisted.
I think it would be very useful to be able to call mixpanel.reset() also without having called mixpanel.init(...) before. That way I could simply do the reset whenever the code triggers a redirect to the external login page.
As you can see there's also another workaround towards the end to delay the SPA pageview tracking to prevent Mixpanel from tracking a pageview with a persisted outdated user ID.
If you have an idea to better solve this with current functionality, let me know.
The text was updated successfully, but these errors were encountered:
I need to reset Mixpanel (
mixpanel.reset()
) when a redirect to login is triggered due to an expired session. As I only initialize Mixpanel for authenticated users, the call tomixpanel.reset()
fails as it runs beforemixpanel.init(...)
in this case.That's how I currently work around this limitation by resetting Mixpanel immediately after initialization if the user ID has changed from what Mixpanel persisted.
I think it would be very useful to be able to call
mixpanel.reset()
also without having calledmixpanel.init(...)
before. That way I could simply do the reset whenever the code triggers a redirect to the external login page.As you can see there's also another workaround towards the end to delay the SPA pageview tracking to prevent Mixpanel from tracking a pageview with a persisted outdated user ID.
If you have an idea to better solve this with current functionality, let me know.
The text was updated successfully, but these errors were encountered: