CookieConsentHQ

Integrations

Install CookieConsentHQ on Wix

Install the CookieConsentHQ Wix cookie banner through Settings, Custom Code, Add Custom Code. Place the snippet in Head on All pages and apply. Wix's own marketing integrations stay outside its control.

Get your install codeFree plan, no card needed.
Installation type
Script tag; not a Wix app
Wix requirement
Published site with a connected domain
Settings location
Settings, Custom Code
Code placement
Head, All pages
Script loading
Without async or defer
Not controlled
Trackers added through Wix marketing integrations

Install CookieConsentHQ through your Wix site's Custom Code settings. Add the loader to Head on All pages and apply the change.

Wix only allows custom code on a site that is published and has a connected domain. Set those up first.

Follow these steps:

  1. Go to Settings in your site's dashboard.
  2. Click Custom Code in the Development & integrations section.
  3. Click Add Custom Code.
  4. Paste the CookieConsentHQ snippet.
  5. Choose All pages.
  6. Under Place Code in, choose Head.
  7. Click Apply.

Your CookieConsentHQ dashboard provides the script in the Install tab. The snippet follows this format:

<script src="https://cdn.cookieconsenthq.com/s/YOUR_SITE_KEY.js"></script>

Replace YOUR_SITE_KEY with your website's assigned key. Do not add async or defer, because CookieConsentHQ needs to set up its consent controls before tracking scripts run.

Wix's custom-code documentation describes the All pages option and the Head placement. It also recommends categorizing custom code for privacy purposes. Since this snippet is the consent tool itself, pick a category that does not hold it back until a visitor makes a choice.

This is a script-tag installation, not a native Wix app. For the shared installation requirements, see the installation documentation.

Which Wix trackers can CookieConsentHQ not control?

Wix states that Google Analytics, Google Tag Manager and the Meta and TikTok pixels do not work through custom code. Wix connects them through its marketing integrations instead, and CookieConsentHQ cannot block or release trackers added that way.

That is the main limitation of using CookieConsentHQ on Wix. If your site relies on those Wix integrations, they follow Wix's own cookie consent settings, not the CookieConsentHQ banner. Running both banners would show visitors two consent interfaces for different trackers.

CookieConsentHQ fits a Wix site best when the trackers you need to control are added as custom code or embeds whose markup you can edit. If most of your tracking runs through Wix's marketing integrations, Wix's built-in tools are probably the simpler choice.

For the trackers it does control, CookieConsentHQ offers Accept all, Reject all and Customize. Its default banner places Reject next to Accept with the same visual weight and provides functional, analytics and marketing categories.

Will the Wix installation load before tracking scripts?

The script needs to run before analytics and advertising tags to set up CookieConsentHQ's blocking controls. Wix's Head setting says where the custom code goes, but inspect the published page to confirm the order in which scripts actually run.

If a tracker runs before the loader, CookieConsentHQ cannot undo that earlier execution. This is why script order matters even when the banner itself appears correctly.

The loader must run synchronously. Avoid async, defer and other settings that delay it behind tracking code.

Where you can edit external script markup, CookieConsentHQ also supports manual blocking attributes. They give you another way to stop scripts from loading before the relevant consent choice.

How can I block scripts and embedded content?

CookieConsentHQ automatically blocks known trackers before consent and supports manual blocking for editable scripts and iframes. Manual markup also stops the browser from requesting an external resource before consent.

For a marketing script, use:

<script type="text/plain" data-cchq="marketing" src="..."></script>

Use analytics or functional when that category applies.

Ordinary <script src> tags for known trackers can be stopped from executing, but a browser may still fetch the file early. Changing the script to type="text/plain" prevents that early request.

For a marketing iframe, use:

<iframe data-cchq="marketing" data-cchq-src="..."></iframe>

This keeps the external URL in data-cchq-src rather than the iframe's regular src attribute.

These controls apply to markup you can edit. They do not reach scripts Wix inserts itself. The cookie scanner shows which cookies its browser-based scans of your public pages actually find.

Yes, CookieConsentHQ provides a cookie table placeholder and a JavaScript method for opening preferences. Place the table element in editable HTML where you want the site's cookie declaration to appear.

Use:

<div data-cchq-cookie-table></div>

The cookie scanner can fill the table from its categorized cookie list. What it lists depends on your plan and the pages it visits.

To let visitors reopen their choices, add a site link that calls CCHQ.showPreferences().

The JavaScript API also provides CCHQ.getConsent(). A site can read the consent ID with CCHQ.getConsent().id, for example when adding it to a privacy request form. The site owner can then find that record in the dashboard's consent log.

How do I test CookieConsentHQ on Wix?

Open the published Wix site and check that the banner loads with your site key. Then use the free checker to inspect one public page for cookies set before consent, hardcoded tracker tags and Consent Mode v2 defaults.

Check the order of scripts in the rendered page as well as the banner's appearance. A visible banner does not show that every tracking script waited for consent, and the checker will also report trackers added through Wix's marketing integrations.

The free checker examines one page. For wider coverage, scheduled scans visit up to 50 pages on Free and 150 on paid plans. Free scans monthly, Starter weekly, and Growth and higher plans daily, as listed on the pricing page.

The website owner remains responsible for checking how its tracking technologies behave and which requirements apply. This page is not legal advice.

Questions

Is CookieConsentHQ a native Wix integration?
No. It uses Wix's Custom Code feature to add the CookieConsentHQ loader.
Where do I install the script?
Go to Settings, Custom Code, Add Custom Code. Paste the snippet, choose All pages, place it in Head, then click Apply.
Can CookieConsentHQ block Google Analytics added through Wix?
No. Wix connects Google Analytics, Google Tag Manager and the Meta and TikTok pixels through its marketing integrations, not custom code. Those follow Wix's own consent settings.
Does placing the code in Head guarantee it loads first?
No. Head is the placement area. Check the published page to see whether the loader runs before your other custom code.
Can I reopen cookie preferences from a site link?
Yes. Add a link that calls CCHQ.showPreferences().