How to embed the Cookie Preference Button on a Wix website

Note: Before you implement the Cookie Preference Button on Wix, make sure you have installed the consent banner code snippet correctly.

1. On your Wix website, add a Themed Button or Text Button

 2. Edit the button text to say 'Cookie Preference Button' (Make sure the text is case sensitive, it must also include the spaces.)

3. Click on Add a link, then set the link to Current window

 4. Open Tracking Tools & Analytics on your Wix portal, then paste the snippet code below to a custom script.

<script>
window.addEventListener("onWidgetLoadComplete",function(){let e=document.querySelectorAll('div[role="button"]');for(let o of e)"Cookie Preference Button"===o.innerText&&window.displayPreferenceModal&&(o.onclick=window.displayPreferenceModal);let o=document.querySelectorAll('button[aria-label="Cookie Preference Button"]');for(let e of o)e.onclick=window.displayPreferenceModal});
</script>


a. Next, choose the specific page you want your cookie preference button.

b. Then select Body - end.

Your snippet should now be accessible on your wix site!

If you are still experiencing issues, reach out to support@termly.io for more help.

Access the Cookie Consent Manager.