-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
identityStorage prop not being respected #603
Comments
@evaleen thank you for choosing Amplitude! I believe the cookies are left over from the initialization performed earlier but under the hood should be using memory storage. Can you try to delete the cookies AMP cookies in non-incognito mode and see if it creates another AMP cookie? |
Hi @kevinpagtakhan thanks for getting back to me :) Correct, it works perfectly on incognito, but this does not solve the case for existing users. On page load, we call |
Hi @kevinpagtakhan , have you had a chance to investigate? This is still a persistent problem we are facing, thanks! |
Hi @evaleen , thanks for reporting this! If I understand the problem correctly, have you tried to use Thanks! |
Hi @liuyang1520 thanks for getting back to me! We are using And yes we are setting Are you suggesting we manually clear the cookies via JS if the user rejects cookie storage? |
Hi @evaleen, that's correct - we suggest that you manually clear the cookies. Once the identity storage was set to "none", Amplitude SDK no longer reads old cookies or writes new ones to respect the current storage option. The cookie name is in the format of "AMP" + the first 10 characters of your API KEY, the same as the API KEY you pass to |
Expected Behavior
identityStorage
in theinit
config tonone
,AMP
cookies wont be stored on browser.Current Behavior
When I set
identityStorage
tonone
for an existing user (who has been tracked previously) I can see that theAMP
cookies are still being set in the browser. When I do this on incognito though, the cookies are not being set (and it uses in memory storage)Also, the current recommendation for updating
internalStorage
on cookie consent is to re-call theinit
function, but when using@amplitude/analytics-browser
with the Amplitude generated event class file, you can only callampli.load
once (which calls the init fn), after that it throws the error:Possible Solution
internalStorage: none
should be respected in all cases.internalStorage
, without having to callinit
again. eg.Environment
The text was updated successfully, but these errors were encountered: