Is there a recommendation of what Identity Store (cookie vs local storage) to use?

  • 26 December 2023
  • 1 reply

Userlevel 3
Badge +2

In the Browser 2.0 SDK it says this:

identityStorage string. Sets storage API for user identity. Options include cookie for document.cookielocalStorage for localStorage, or none to opt-out of persisting user identity.


By default this is “cookie” but is there an advantage to use localStorage?  When should we use this option? I realize there must be legacy browser issues, but that would have to be super old browsers that don’t support localStorage so trying to figure out the gotchas here.


The docs do not give any guidance on this.


1 reply


This is an extremely relevant question, particularly with Google Chrome rolling out the elimination of 3rd party cookies altogether this year (

We need a definitive guidance from Amplitude on this!