How do I install CookieConsentHQ on WooCommerce?
WooCommerce runs on WordPress, so you install the WordPress plugin directly from the WordPress.org directory:
- In WordPress admin, open Plugins, Add Plugin and search for CookieConsentHQ.
- Install and activate the plugin.
- Open Settings, CookieConsentHQ, paste your site key or script URL from the Install tab and save.
The plugin prints the banner loader through wp_head at priority -9999, with data-cfasync="false", data-no-optimize and data-no-defer attributes so Cloudflare Rocket Loader and LiteSpeed Cache do not delay it.
Which WooCommerce cookies are necessary vs optional?
WooCommerce sets a small set of first-party cookies to run the shopping cart and checkout:
woocommerce_cart_hashandwoocommerce_items_in_carthelp WooCommerce detect when cart contents change.wp_woocommerce_session_*holds a unique code for each shopper so WooCommerce can find their cart data in the database.
CookieConsentHQ classifies these store cookies as necessary so shoppers can add items to their cart and check out before interacting with the banner. Marketing and analytics cookies added by store extensions, such as _ga, _fbp, _gcl_au or TikTok and Pinterest pixels, are held back until the shopper grants consent.
How does the WP Consent API work with WooCommerce?
WooCommerce includes native support for the WP Consent API, and the CookieConsentHQ plugin publishes each visitor's choice to it automatically.
When a shopper chooses analytics or marketing preferences in the CookieConsentHQ banner, WooCommerce and any third-party extension that reads wp_has_consent() receive the updated state. For extensions that inject their own tracking script without checking the WP Consent API, CookieConsentHQ's automatic tracker blocking and Google Consent Mode v2 defaults still guard known ad and analytics hosts.
How do I check product and cart pages for pre-consent cookies?
Homepage scans miss trackers that only fire on product, cart or checkout pages (for example ViewContent or AddToCart pixels). After connecting the plugin and clearing your page cache:
- Run Verify installation in your CookieConsentHQ dashboard to check your homepage script order and live version.
- Run a full multi-page scan with the cookie scanner so product and category pages are checked too.
- Test a product page URL in the free cookie checker to inspect cookies set before consent and Consent Mode v2 defaults.
If a page cache or theme header stops the banner from showing, see Cookie banner not showing or the installation documentation.
This page is technical installation guidance, not legal advice.