Cookie consent for WooCommerce: install Cookifi in under 10 minutes

WooCommerce has no cookie banner of its own and no Consent Mode defaults, so GA4 and Ads fire the moment a visitor lands. Cookifi goes in the head through WPCode and gates them.

What you need

None on self-hosted WordPress, which is where WooCommerce runs. On WordPress.com, installing plugins requires the Business or Commerce tier; without a plugin, use a child theme's functions.php and add_action('wp_head', …).

Install Cookifi on WooCommerce

  1. 1

    Install a header-snippet plugin

    Plugins → Add New → search for 'WPCode' → Install → Activate. The free version is enough; any plugin that can print to wp_head works.

  2. 2

    Open the global header field

    In the sidebar go to Code Snippets → Header & Footer. The Header box only exists on this screen, not in the snippets list.

  3. 3

    Paste the Cookifi integration script

    Paste it into the Header box, at the top if the box already holds other tags — WPCode prints them in the order they are typed — then Save Changes.

  4. 4

    Purge every cache

    WPCode purges most page caches itself, but purge your host's as well (WP Engine, Kinsta, Cloudflare). Until then the shop keeps serving HTML without the script.

  5. 5

    Exclude it from JavaScript delay

    In WP Rocket, LiteSpeed Cache or Flying Scripts, add the Cookifi script to the exclusion list for 'Delay JavaScript Execution'. It has to load before the tags it governs.

Get your Cookifi script

  1. 1.

    In the Cookifi admin click Add, enter a name and your domain — a sitemap URL is optional — and click Create.

  2. 2.

    Open the property and copy the script under General → Integration script.

  3. 3.

    Click the Google icon in the script toolbar to include the Consent Mode default command. The defaults themselves are set under Regions, together with URL Passthrough and Ads Data Redaction.

  4. 4.

    Paste it as high in the <head> as the platform allows, on every page. Save, reload, and confirm the banner appears.

  5. 5.

    If the platform strips data- attributes and the banner does not load, switch to Query string mode in the Installation script section and copy the script again.

  6. 6.

    Cannot touch the head at all? Use the GTM Installation script in a Custom HTML tag with the Consent Initialization – All Pages trigger. Direct installation is still the recommendation, because ad blockers can suppress GTM.

Consent Mode v2 and GTM on WooCommerce

WooCommerce has no Consent Mode of its own. The WooCommerce Google Analytics Integration and Site Kit both emit GA4 without consent defaults unless a CMP sets them, so Cookifi has to load before either. Performance plugins are the real trap here: 'Delay JavaScript Execution' and friends reorder third-party scripts, which can let a tag fire ahead of the consent defaults.

What the native WooCommerce banner cannot do

WooCommerce ships no cookie banner of its own, so until you add a CMP nothing asks for consent and nothing holds a tag back.

Gotchas worth knowing

  • Page caching keeps serving the old HTML after the snippet is added — purge every layer, including the CDN.
  • Delay, defer and minify optimizers reorder scripts, so GA or GTM can fire before consent. Exclude the Cookifi script from all of them.
  • Editing the parent theme's header.php works until the next theme update overwrites it. Use a snippet plugin or a child theme.

What you get with Cookifi

Live in under 10 minutes

One script in the head, a scan that suggests the categories for you, and a 14-day trial that needs no card.

A flat base, not a tier ladder

One monthly base from €10 plus usage on read events — the first 10,000 each month are free. Subdomains and team members are unlimited, so a second site is not a second plan.

Support that answers

Live chat and email on every plan, with a human response within one business day on Enterprise. We are a small team, which is why the things customers ask for tend to ship quickly.

Built for the modern stack

Google and Microsoft Consent Mode v2 are first-class, GA4 and GTM are the default path, and Cookifi is a Google-certified CMP partner.

Frequently asked questions

Do I need a WooCommerce-specific plugin?

No. Cookifi is a single script tag in the head, so any way of printing to wp_head is fine — a snippet plugin, a child theme, or your host's header field.

The banner does not appear. What is wrong?

In order of likelihood: a page cache serving the pre-snippet HTML, an optimizer delaying the script, or a theme that never calls wp_head(). Check the served HTML first — if the script tag is missing from it, it is a cache.

Does Cookifi block the WooCommerce cookies themselves?

The cart and session cookies WooCommerce needs to work are strictly necessary and stay. Cookifi gates the analytics and advertising scripts, which is where consent actually applies.

Sources

Every fact on this page comes from the pages linked below. Spotted something out of date? Tell us and we will correct it.

Last reviewed November 2, 2026

All platform guides

Try it on your own site

14 days, no credit card. If the install takes you longer than ten minutes, tell us — on our side that counts as a bug.