Changing a Cookie
1 min read
Some cookies are generated directly by the VTEX Database. These you cannot change. The cookies generate externally and entered via JavaScript such as Google Tag Manager can be edited. Editing can be done in JavaScript, as in the generic case below where the time of validity is defined.
document.cookie = "username=John Doe; expires=Thu, 18 Dec 2013 12:00:00 UTC; path=/";
You must remember that VTEX will not recognize cookies with special characters. Whenever this happens, the user will not be able to load another page on the store (blank screen).