How to add a cookie consent banner to a Wix site
In Wix, add the snippet from Settings, then Custom Code (in the Development & integrations section), with Add Code to Pages set to All pages and Place Code in set to Head; the site must be published with a connected domain. Turn off Wix's Show banner toggle under Privacy & Cookies, and add your tags through Custom Code rather than Marketing Integrations so Cookiequiet can hold them.Steps
Where to paste the snippet in Wix
Wix adds custom code from the dashboard, not from the editor. The site must be published and have a connected domain first.
- In your site's dashboard, go to Settings.
- In the Development & integrations section, click Custom Code, then + Add Custom Code at the top right.
- Paste the snippet and name it, for example "Cookiequiet".
- Under Add Code to Pages, select All pages and keep the option to load the code once per visit.
- Under Place Code in, select Head, then click Apply.
html<script src="https://cookiequiet.com/cq.js" data-site="YOUR_SITE_KEY" data-consent-mode="1" data-auto-block="1" defer></script>
Wix documents that custom code snippets are deleted when you change the site's domain, so re-add the snippet after a domain change.
Wix's own banner and cookies
Wix's original cookie banner is no longer available for new sites; Wix now offers Usercentrics for Wix instead. If your site still has the original banner, go to Privacy & Cookies in the dashboard, open Cookie Consent Banner and switch Show banner off. Do not install Usercentrics for Wix at the same time: one banner, one consent log.
The cookies Wix itself sets on your site (XSRF-TOKEN, hs, svSession, SSR-caching, bSession, fedops.logger.sessionId, _wixAB3 and a few others) are all classed as essential in Wix's own list, so there is nothing to block on Wix's side; list them under Necessary in your cookie table. Wix's platform analytics keeps running whatever a third-party banner says; only Wix's consent policy, set by its own banner or by Velo code through the Consent Policy API, changes that.
How to handle Marketing Integrations and embeds
Marketing Integrations. The Google tag, Google Ads, Meta Pixel and Google Tag Manager connected under Marketing Integrations are injected by Wix's own code and obey Wix's consent policy, not Cookiequiet. With data-auto-block="1", Cookiequiet holds scripts of known trackers (gtag.js, fbevents.js) that are created with JavaScript after it has run, but Wix controls the loading order of its own code, so the result must be tested. The reliable route is to disconnect the integration and add the tag as a second Custom Code snippet in the Head, below Cookiequiet, in one of two ways:
- marked, so it does not load before consent:
<script type="text/plain" data-cq-category="analytics" src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXX"></script>plus the inline part marked the same way (the Meta Pixel getsmarketing); - or preceded by Google's default consent block for Consent Mode, as shown in the Google Analytics 4 guide.
Embed HTML element. Wix renders the HTML of that element inside an iframe on another origin. Cookiequiet, which runs in the page, cannot see or hold anything inside it, so never put a tracker there; use Custom Code.
Videos. Wix's video elements build their players with JavaScript. The auto-blocker treats youtube.com/embed as marketing and holds the player until that category is granted; check the behavior in the test step. For a Vimeo or YouTube iframe you write yourself, Custom Code is not the place either (it is not visible content), so rely on the auto-blocker.
Chat and other apps from the Wix App Market. They are loaded by Wix. The auto-blocker holds the ones in its list of known trackers; the others run, which the cookie scanner will show.
How to add the Cookie preferences link
Wix's link panel expects a web address, not a bare #cq-preferences, so use one of these:
- turn on the floating "Cookie preferences" button in the banner settings; it appears after a choice in the corner you chose;
- or add a Custom Code snippet placed in Body - end containing
<a href="#cq-preferences" data-cq-show-preferences>Cookie preferences</a>, styled with inline CSS to match your footer.
How to test
- Open the published site (not the editor preview) in a private window and click Reject all.
- Check the cookies in the developer tools:
cq_consent, Wix's essential cookies, nothing from Google or Meta. - Clear the cookies, click Accept all, reload: the marked tags run.
- Check the consent log in the Cookiequiet dashboard.
What is specific to Wix
- Premium only. Custom code needs a published site with a connected domain; free Wix sites cannot load the snippet.
- Wix Studio uses the same dashboard path (Settings, then Custom Code).
- Velo developers can also push the choice into Wix's own consent policy with
consentPolicyManager.setConsentPolicyfrom the Wix SDK, which makes Wix's own tools follow it; that is page code, beyond this guide. - Geo-targeting works on every plan: show the banner only to visitors in regulated countries if your US visitors should not see it, see do I need a cookie banner.