Docs

Install guides

Create an account, add your domain, publish the banner and copy the script from the Install tab. Place it first inside the page head, add manual blocking where needed and check the published site with the free checker.

Create a free accountYour install code is on the site's Install tab.
Loader
About 5 KB gzip
Script placement
First tag inside head; synchronous
Supported installs
WordPress; GTM; Shopify; Webflow; Wix; Squarespace; HTML
Manual script blocking
type=text/plain with data-cchq
Embedded content
data-cchq-src
Cookie declaration
data-cchq-cookie-table

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:

  1. Create a free account.
  2. Add the domain where the banner will run.
  3. Configure and publish the banner.
  4. Open the site's Install tab.
  5. 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
  1. In WordPress, go to Plugins → Add Plugin and search for CookieConsentHQ.
  2. Click Install Now, then Activate.
  3. Open Settings → CookieConsentHQ.
  4. 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.
Full WordPress guide

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.

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.

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 returns null until the visitor has chosen, and again after the choice expires or the cookie purposes change.
  • CCHQ.setConsent({ analytics: true }) records a custom choice. Only functional, analytics and marketing are read, only true allows 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.

Questions

Where do I find my CookieConsentHQ script?
Open your site's Install tab in the dashboard. Copy the script containing your assigned site key.
Can I load the script with async or defer?
No. The loader must run synchronously before analytics and advertising tags.
How do I stop external script requests before consent?
Change editable script tags to type="text/plain" with data-cchq="marketing", data-cchq="analytics" or data-cchq="functional".
How do visitors reopen their preferences?
Add a footer link or another site control that calls CCHQ.showPreferences().
How do I find a visitor's consent record?
The website can read CCHQ.getConsent()?.id, for example to include the ID in a privacy request form. The owner looks up that ID in the dashboard.