Question:
How to set custom cookies?
Product:
Wix Editor, Dev mode
What are you trying to achieve:
I would like to set custom cookies like document.cookie = ...
(so not sessionStorage, localStorage or memoryStorage). As DOM is unavailable, I’m wondering how to do this. Is there any way, apart from creating a custom element which is unnecessary, to do this with velo? Or are you planning to add this functionality in the future?
What have you already tried:
I’ve tried:
- wix-frontend-storage. Does not work for me as I need the items to be available across different tabs (with other urls)
- Custom Element Overkill and I do not want to create an entire element.
- Other forum topics did not provide answers.
As you mentioned, Wix doesn’t provide access to the DOM, and as far as I’m aware there aren’t any current plans.
it sounds like the custom element might be the best way forward for your specific needs 
Hi Noah,
Bumping this as this topic is now very relevant with the sandboxing of custom elements coming at the end of this year (2 weeks!).
Given custom elements will no longer be usable as a working around of storing & reading cookies via Wix - what other workarounds does Wix/the community suggest for this?
Being able to read cookies set by other sites is a key functionality for many marketing integrations - keen to understand how we can retain access to this functionality
Thanks
Blair
Hey @blairholmes!
Just want to reassure you that the change only affects editor & preview, not the live site 
Hope this clarifies things for you 
1 Like