How do I start using CookieConsentHQ?
Create a free CookieConsentHQ account, add your website's domain and publish your banner configuration. The dashboard then gives you a site-specific loader in the Install tab.
Follow these steps:
- Create a free account.
- Add the domain where the banner will run.
- Configure and publish the banner.
- Open the site's Install tab.
- Copy the installation snippet.
The Free plan includes one site, 25,000 monthly pageviews, monthly scans and one year of consent log retention. The pricing page lists every plan.
Every plan includes automatic blocking of known trackers before consent, Global Privacy Control support, all four Google Consent Mode v2 signals and consent records with CSV export.
Banner text comes in English, German, French, Spanish, Italian, Dutch and Portuguese. You can edit the text for your website.
Where should I place the installation script?
Place the CookieConsentHQ script first inside <head>, before analytics, advertising and other tracking tags. Load it synchronously, without async or defer.
The Install tab provides a snippet in this format:
<script src="https://cdn.cookieconsenthq.com/s/YOUR_SITE_KEY.js"></script>
Replace YOUR_SITE_KEY with the site key from your dashboard.
The loader is about 5 KB gzip. It needs early placement because its consent defaults and blocking controls must run before tracking scripts.
If your platform inserts scripts automatically, inspect the published HTML to see whether the CookieConsentHQ loader really runs first.
How do I install CookieConsentHQ on my platform?
Choose your platform below. Each tab has the steps, what that install method can't cover, and a link to the full guide. WordPress uses our plugin and Google Tag Manager our template; the other platforms use the script tag, not a native app, so check the script order on the published site.
WordPress
Our plugin, free in the WordPress.org directory, prints the banner first in the page head and connects to the WordPress Consent API.
Plugin ZIP for manual install- In WordPress, go to Plugins → Add Plugin and search for CookieConsentHQ.
- Click Install Now, then Activate.
- Open Settings → CookieConsentHQ.
- Paste your snippet (the script URL or the bare site key also work) and save.
- If your host blocks installs from WordPress.org, download the plugin ZIP and upload it under Plugins → Add Plugin → Upload Plugin instead.
- Use [cchq_cookie_table] to show your cookie list on a page.
Shopify
Install the CookieConsentHQ app from the Shopify App Store and choose Connect an existing site, or add the snippet to your theme as below so it loads on every storefront page.
- Go to Online Store → Themes, open the … menu and choose Edit code.
- Open layout/theme.liquid.
- Paste your snippet right after the opening <head> tag and save.
- Go to Settings → Customer privacy and turn off Shopify's own cookie banner, so visitors don't see two.
- Shopify controls its checkout pages, so the theme snippet doesn't run on checkout.
Wix
Wix accepts custom code on a published site with a connected domain.
- In your site's dashboard, go to Settings → Custom Code → Add Custom Code.
- Paste your snippet.
- Choose All pages, and under Place Code in, choose Head.
- Click Apply.
- Google Analytics, Google Tag Manager and the Meta and TikTok pixels added through Wix's own marketing integrations can't be blocked by any custom-code banner, ours included.
Webflow
Add the snippet to the site-wide head code.
- Open Site settings → Custom code.
- Paste your snippet at the top of Head code.
- Save, then publish the site.
- Webflow places Head code just before the closing </head>, so check that no tracker comes before the snippet.
Squarespace
Code injection is available on the Core, Plus and Advanced plans and some legacy plans.
- Open the Code Injection panel.
- Paste your snippet into the Header field.
- Save.
- Squarespace's checkout pages don't accept custom code, so the banner doesn't run there.
- Other code may still come before the snippet; check the head order on the published site.
Google Tag Manager
Our template sets Consent Mode defaults, then loads the banner. Pasting the snippet above GTM in your page head is still the strongest setup.
Download the GTM template- Download the template file.
- In GTM, open Templates → Tag Templates → New, then use the … menu to Import the file.
- Open Tags → New and choose CookieConsentHQ Consent Mode.
- Paste your script URL.
- Set the trigger to Consent Initialization - All Pages, then preview and publish.
- Loaded through GTM, the banner can gate GTM-managed tags but can't block trackers hardcoded in the page that run earlier.
- Load the banner through one method only.
Any HTML site
Works with any site where you can edit the page head.
- Paste your snippet as the first tag right after the opening <head> on every page, or in your shared header template.
- Publish the updated pages.
- Keep it synchronous: no async or defer, so trackers are blocked from the start.
Platform names and logos are trademarks of their owners and are shown only to say where CookieConsentHQ works.
The WordPress plugin prints the loader through wp_head at priority -9999, supports the WordPress Consent API and provides the [cchq_cookie_table] shortcode.
The GTM template uses setDefaultConsentState and supports regional defaults. On every page the banner then sends a consent update with the choices in effect (the stored choice, or the region's default before the visitor chooses) and pushes cchq_consent to the dataLayer, with the choices in cchq.functional, cchq.analytics and cchq.marketing. It does both again when the visitor chooses.
How do I stop scripts from making requests before consent?
For editable external scripts, change the script type to text/plain and give it a CookieConsentHQ category. The browser then neither fetches nor runs the script until the visitor allows that category.
For example:
<script
type="text/plain"
data-cchq="marketing"
src="..."
></script>
The category values are marketing, analytics and functional.
CookieConsentHQ automatically blocks known trackers written with ordinary <script src> tags before consent. Browsers may still fetch those files early, even though they don't run.
Use the manual markup when stopping the early request matters. You need to be able to edit the script tag to use it.
The cookie scanner shows which cookies its browser-based scans find.
How do I block embeds and display the cookie table?
For an iframe such as an embedded YouTube video, move the external URL into data-cchq-src and give it a consent category. For a cookie declaration table, place the CookieConsentHQ placeholder in the page content.
Example iframe:
<iframe
data-cchq="marketing"
data-cchq-src="..."
></iframe>
Cookie declaration placeholder:
<div data-cchq-cookie-table></div>
The scanner categorizes the cookies it finds. The table shows the cookies in your published banner, so scan results appear in it after you apply the scan and publish. Free scans cover up to 50 pages and paid plans up to 150 pages per scan.
WordPress users can place [cchq_cookie_table] in page content instead of the HTML placeholder.
How do I reopen preferences and use the JavaScript API?
CookieConsentHQ exposes JavaScript methods for reopening preferences, applying choices and reading the current consent state. Add a footer link that calls CCHQ.showPreferences() so visitors can return to their settings.
Example footer link:
<a href="#" onclick="CCHQ.showPreferences(); return false;">
Cookie preferences
</a>
The API methods are:
CCHQ.showPreferences()opens preferences.CCHQ.acceptAll()accepts all categories.CCHQ.rejectAll()rejects all optional categories.CCHQ.getConsent()reads the current consent state. It returnsnulluntil the visitor has chosen, and again after the choice expires or the cookie purposes change.CCHQ.setConsent({ analytics: true })records a custom choice. Onlyfunctional,analyticsandmarketingare read, onlytrueallows a category, and categories left out keep their current value.CCHQ.onConsent(callback)registers a consent callback.
To link a privacy request to a consent record, the website can read:
const consentId = CCHQ.getConsent()?.id;
The site can include that ID in a privacy request form, and the owner opens the matching record by ID in the dashboard's consent log. The banner itself does not show the consent ID.
How do I check the published installation?
Open the published website and confirm that CookieConsentHQ loads before the tracking tags. Then use the free checker to inspect one page for cookies set before consent, hardcoded tracker tags and Consent Mode v2 defaults.
The checker also recognizes 22 consent tools, so it works on a page running a different banner. It scans one page, not the whole website.
If the banner doesn't appear at all, Cookie banner not showing goes through nine causes one by one, from stored consent and caching to a Content Security Policy and region rules.
For broader coverage, use the scheduled cookie scanner. Free scans monthly, Starter weekly, and Growth, Business and Agency daily.
If you use Google Consent Mode, follow the Consent Mode testing guide. From Starter, the Consent Mode Health Monitor reads the consent information in Google's requests during each scheduled scan.
A working banner and a clean page check describe the configuration you tested. They don't show that every script or legal requirement has been handled. The website owner remains responsible for that. This documentation is not legal advice.