CookieConsentHQ

Integrations

Install CookieConsentHQ on WordPress

The CookieConsentHQ WordPress cookie consent plugin loads your banner early in the page head and connects with the WP Consent API. Install its ZIP file, enter your site key or script URL, and save the settings.

Get your install codeFree plan, no card needed.
Plugin slug
cookieconsenthq
License
GPL-2.0-or-later
Installation
ZIP upload; not yet on WordPress.org
Script position
wp_head priority -9999
Consent integration
WP Consent API
Cookie table
[cchq_cookie_table] shortcode

Download the CookieConsentHQ plugin ZIP and upload it through your WordPress dashboard. The plugin has the slug cookieconsenthq, uses the GPL-2.0-or-later license and is not yet listed in the WordPress.org plugin directory.

Follow these steps:

  1. Download cookieconsenthq-wordpress.zip.
  2. Open WordPress and go to Plugins, Add New, Upload Plugin.
  3. Select the downloaded ZIP file.
  4. Click Install Now.
  5. Activate the plugin after installation.

WordPress documents this ZIP upload process in its official plugin installation instructions. Because CookieConsentHQ is not yet listed in the directory, searching for its name in the WordPress plugin browser is not the installation method.

After activation, open Settings, CookieConsentHQ to connect the plugin to your website's banner configuration.

The full installation documentation also covers other platforms and direct script installation. Use the WordPress plugin when you want its early script output, shortcode and WP Consent API connection.

How do I connect the plugin to CookieConsentHQ?

Open Settings, CookieConsentHQ and paste the installation information from your site's Install tab. The plugin accepts the script URL, the complete script tag or the bare site key.

The Install tab provides a script using this format:

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

Replace YOUR_SITE_KEY with the key assigned to your website. You can copy the URL directly instead of the complete tag, or enter the site key on its own.

Save the WordPress settings after entering the value.

The plugin then prints the CookieConsentHQ loader in the page head. You do not need to paste a second copy of the same loader into the theme when using the plugin.

If the banner is missing after configuration, check the saved value and inspect the published page for the loader. The free website checker can then inspect one public page for cookies set before consent, hardcoded tracker tags and Consent Mode v2 defaults.

Does the plugin load before tracking scripts?

The plugin prints the CookieConsentHQ script through wp_head at priority -9999 and loads it synchronously. It also includes attributes intended to prevent Cloudflare Rocket Loader and LiteSpeed Cache from delaying or optimizing the loader.

The script includes data-cfasync="false" for Cloudflare Rocket Loader, plus data-no-optimize and data-no-defer for LiteSpeed Cache.

Early placement matters because CookieConsentHQ needs to establish consent controls before analytics and advertising tags execute. The intended installation places the loader first inside <head>, without async or defer.

A WordPress theme may contain scripts written directly into its header rather than attached to wp_head. Check the rendered page when those scripts exist, because the plugin's hook priority does not move hardcoded markup that appears before the hook.

The plugin does not print its loader in wp-admin, feeds, embeds, REST requests or AMP pages. Its standard output is intended for the website's public pages.

CookieConsentHQ registers with the WordPress Consent API so other plugins using wp_has_consent() can read the visitor's recorded choice. Server-side consent checks use opt-in behavior until a visitor choice is available.

The WP Consent API defines a shared method for participating plugins to communicate consent categories. CookieConsentHQ supplies the banner choice through that interface.

This behavior applies to plugins that read the API. Installing CookieConsentHQ does not establish that every WordPress plugin uses it or that every hardcoded tracker is covered by that integration.

CookieConsentHQ also provides automatic blocking of known trackers before consent. For additional control of tracking scripts and embedded content, the installation documentation explains the supported manual blocking attributes.

Yes, the plugin provides the [cchq_cookie_table] shortcode for displaying the CookieConsentHQ cookie declaration table. Add the shortcode where you want the table to appear in your cookie policy content.

The table can be filled using the cookie scanner's categorized results. The scanner uses Chromium to visit public website pages before consent and revisits the first few pages after acceptance.

You can also add a preference link that calls CCHQ.showPreferences() so visitors can reopen their consent controls.

For sites that need consent records, the consent log stores the recorded action, categories, timestamp and banner configuration version. The website can read a consent ID using CCHQ.getConsent().id, and the owner can look up that record in the dashboard.

Can I install CookieConsentHQ without the plugin?

Yes, you can install CookieConsentHQ using a header-scripts plugin instead of its WordPress plugin. Paste the snippet from the Install tab and make sure it loads first inside <head>, before analytics and advertising tags.

Use a single loading method for the banner. A manual script installation does not provide the CookieConsentHQ WordPress plugin's WP Consent API registration or shortcode.

If you remove the WordPress plugin, its saved option is deleted on uninstall. On a multisite installation, the uninstall process deletes the option for every site in the network.

After making installation changes, check the published site with the free checker. Review its findings alongside the actual page source, especially when tracking scripts are placed directly in the theme.

CookieConsentHQ provides consent controls, but the website owner remains responsible for checking the installed scripts and applicable privacy requirements. This page is not legal advice.

Questions

Can I find the plugin in the WordPress.org directory?
Not yet. Download the ZIP from /downloads/cookieconsenthq-wordpress.zip and install it through Plugins, Add New, Upload Plugin.
What do I enter in the plugin settings?
You can paste the script URL, the complete script tag or the bare site key from your CookieConsentHQ Install tab.
Does the plugin work with the WP Consent API?
Yes. It registers consent choices so supporting plugins that use wp_has_consent() can read them. Server-side checks use opt-in behavior until a visitor choice exists.
Does the plugin work with Cloudflare Rocket Loader?
The script includes data-cfasync="false" for Rocket Loader, along with data-no-optimize and data-no-defer for LiteSpeed Cache.
What happens when I uninstall the plugin?
Uninstalling deletes the plugin's saved option, including on every site in a WordPress multisite network.