amplitude / Amplitude-JavaScript

JavaScript SDK for Amplitude
MIT License
315 stars 132 forks source link

fix: skip top domain when cookie is disabled #580

Closed liuyang1520 closed 1 year ago

liuyang1520 commented 1 year ago

Summary

For test cookie, we have the random id each time when testing whether the cookie is enabled in the browser, this might introduce too many cookies if the remove operation gets any issue. Following the TS SDK, think we can just use the general key for testing purpose.

With disabledCookies set to true, we still have a topDomain function which still uses the cookies (base-cookie):

Checklist