Skip to content

localStorage support

Compare
Choose a tag to compare
@tdumitrescu tdumitrescu released this 06 May 00:04
· 1124 commits to master since this release

Adds a new config option to use localStorage instead of cookies to persist user data in the browser:

mixpanel.init(TOKEN, {persistence: 'localStorage'});

If a cookie with the same name exists, it will be removed and its data transferred to the new localStorage entry.

The old config options cookie_name and disable_cookie are now aliased to persistence_name and disable_persistence.