URL Parameters to enable/disable the cookie banner of a Wix website

Hi all,

I’ve been using Wix to build a website. We have a cookie banner but I’d like to deactivate the cookie banner (i.e. not show it) in some cases. We want to use a ?noCookieBanner URL param to do this, but ideally we’d like to do so with minimal changes to the code base of the website (i.e, we don’t want to have to manually modify all the source of existing - and future - pages).

Is there a way to do this?

I tried to use the wixLocation API to implement a hook in the masterPage.js, but I was told off by the editor because some elements were missing in the DOM etc. Not sure how developing on top of Wix looks like. I’ve read a bunch of blog posts, but I’d appreciate your help to help us get this ?noCookieBanner URL params working on all pages.

Thanks!
Antoine

Hey @user225!

Firstly, great to hear you want to explore adding some customisation on top of your site.

In Velo, you don’t have access to the DOM. But you can use Velo APIs to achieve different things.

For example, these are the APIs related to ConsentPolicy (cookie banner) - ConsentPolicy - Velo API Reference - Wix.com