Change Cookie Consent on Wix Websites Using CookieYes

According to GDPR, the visitors to a website should be able to reverse the consent they have given to the use of cookies. CookieYes allows a website to give users the option to change their consent once they have.

To enable the 'change consent' feature on a website using CookieYes, all you need to do is add the class cky-banner-element to an HTML element clicking on which the dismissed banner will appear again. But the same cannot be done to change cookie consent on a Wix website. But, it can be accomplished in simple steps.

Changing Cookie Consent on a Wix Website

On a Wix website, simply adding the class will not make the HTML element bring back the banner. This is because Wix does not allow you to add a CSS class to any element directly. So, to add an element to enable the users to change consent, follow the steps below:

Step 1: Add the HTML element to the website

First add the HTML element on your Wix website, preferably a button anywhere on your website. Add a suitable text to the element to tell the users what it does. For example "Change Cookie Preferences".

Step 2: Get the element ID

After adding the element to the website, inspect the element and obtain its id using the developer tools.

Getting id of button in Wix to add in the change consent code.

Step 3: Add the code snippet within <body> and </body> tags

To do that, from your Wix Dashboard, go to Settings > Tracking and Analysis > Custom

Adding custom code to a Wix website

Then from the fields provided, add the code snippet below to the Body-end.


The "buttonid" in the code should be replaced by the id of the element that is added by Wix. The id in the code snippet and the id of the element added to change the consent should be the same.

Adding CookieYes change consent code to Wix

After adding the code, click on Apply.

The above steps will enable you to add an element, be it a button or a link, that will help your users to change their consent, on your Wix website.

Note: Change consent code cannot be applied to an <iframe> in your Wix website. Adding a link for the purpose of changing consent will not be possible since Wix does not add an id to the <a> tag.

To know more about setting up CookieYes on your website, read our set up guide.

For any issues or questions regarding CookieYes, contact our support team here.