How I Triggered the Native Wix Cookie Settings Panel from a Custom Footer Link in Wix Studio
Note: I worked through this solution with the help of ChatGPT during the troubleshooting process, but the final setup was tested manually on the live Wix site.
I wanted to add a clean “Cookie Settings” link in my website footer, while still using the native Wix cookie banner and Wix’s own consent handling.
The goal was not to replace the Wix cookie banner, and not to build a custom consent system. I only wanted a footer link that could reopen the native Wix cookie settings panel, because the native revisit button is quite basic visually and cannot be placed freely anywhere on the page.
After testing, I found that the native Wix “Cookie settings” revisit button can be triggered from the page DOM.
The Wix Native Element
On the live site, the native Wix cookie settings button appears with this structure:
<div data-hook="consent-banner-revisit-settings-container">
<button data-hook="consent-banner-revisit-settings-button">
<p data-hook="consent-banner-revisit-settings-button-text">
Cookie settings
</p>
</button>
</div>
The important trigger is:
button[data-hook="consent-banner-revisit-settings-button"]
This means the native Wix button must remain active in the cookie banner settings.
If the native cookie settings / revisit button is disabled, Wix removes it from the page and there is nothing to trigger.
Final Setup
The working approach is:
Keep Wix native cookie settings button active
↓
Hide the native floating button with CSS
↓
Add a custom footer link
↓
Footer link programmatically clicks the hidden Wix native button
↓
Wix native cookie settings panel opens
1. Hide the Native Floating Button
Add this in:
Dashboard → Settings → Custom Code → Add Custom Code
Settings:
Place code in: Head
Add to: All pages
Load: Once per page
Code:
<style>
[data-hook="consent-banner-revisit-settings-container"] {
opacity: 0 !important;
visibility: hidden !important;
pointer-events: none !important;
width: 1px !important;
height: 1px !important;
overflow: hidden !important;
position: fixed !important;
left: -9999px !important;
bottom: 0 !important;
z-index: -1 !important;
}
</style>
This keeps the native Wix element in the page, but hides it visually.
2. Add the Footer Trigger Script
Add a second custom code snippet.
Settings:
Place code in: Body - end
Add to: All pages
Load: Once per page
Code:
<script>
(function () {
function openWixCookieSettings() {
const button = document.querySelector(
'button[data-hook="consent-banner-revisit-settings-button"]'
);
if (button) {
button.click();
} else {
console.warn("Wix cookie settings button not found.");
}
}
document.addEventListener("click", function (event) {
const link = event.target.closest('a[href*="#cookie-settings"]');
if (!link) return;
event.preventDefault();
openWixCookieSettings();
}, true);
})();
</script>
3. Add the Footer Link
In the Wix Studio footer, add a text link or button called:
Cookie Settings
Wix Studio may not accept only:
#cookie-settings
So I used the full URL instead:
https://www.yourdomain.com/#cookie-settings
Set it to open in the current window.
The JavaScript detects the #cookie-settings part of the link and opens the native Wix cookie settings panel before the page navigates.
Important Notes
This was tested with the native Wix cookie banner, not Usercentrics.
The native Wix cookie settings button must remain enabled.
If it is disabled from the Wix cookie banner settings, the DOM element is removed and the custom footer trigger will not work.
Also, this is not an official Wix Velo API method. It is a practical DOM-based workaround using the native Wix button that already exists on the live site.
The benefit is that Wix still handles the real cookie consent logic, including the native consent system, while the website can show a cleaner custom footer link.