# How I Triggered the Native Wix Cookie Settings Panel from a Custom Footer Link in Wix Studio

**URL:** <https://forum.wixstudio.com/t/how-i-triggered-the-native-wix-cookie-settings-panel-from-a-custom-footer-link-in-wix-studio/78269>\
**Category:** Show and tell\
**Tags:** code, wix-studio\
**Created:** [May 20, 2026, 9:45pm UTC](https://forum.wixstudio.com/t/how-i-triggered-the-native-wix-cookie-settings-panel-from-a-custom-footer-link-in-wix-studio/78269 "2026-05-20T21:45:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![enton](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/enton/32/26296_2.png) [@enton](https://forum.wixstudio.com/u/enton)\
**Post date:** [May 20, 2026, 9:45pm UTC](https://forum.wixstudio.com/t/how-i-triggered-the-native-wix-cookie-settings-panel-from-a-custom-footer-link-in-wix-studio/78269/1 "2026-05-20T21:45:18Z")

</div>

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:

```javascript
<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:

```javascript
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:

```javascript
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:

```javascript
Place code in: Head
Add to: All pages
Load: Once per page

```

Code:

```javascript
<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:

```javascript
Place code in: Body - end
Add to: All pages
Load: Once per page

```

Code:

```javascript
<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:

```javascript
Cookie Settings

```

Wix Studio may not accept only:

```javascript
#cookie-settings

```

So I used the full URL instead:

```javascript
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.
