Cookie consent for Shopware 6: install Cookifi in under 10 minutes

Shopware's cookie consent manager sets and clears cookies, but it blocks nothing: every plugin has to gate its own scripts. Cookifi loads first from a Twig override and governs the lot.

What you need

Self-hosted Shopware 6 (including the free Community Edition) takes plugins and themes, which is all this needs. On Shopware SaaS plugins cannot be installed at all — you need a Store app that can change storefront templates or inject a header snippet.

Install Cookifi on Shopware 6

  1. 1

    Extend the storefront meta template

    Shopware has no admin field for head scripts. In your child theme or plugin create src/Resources/views/storefront/layout/meta.html.twig starting with {% sw_extends '@Storefront/storefront/layout/meta.html.twig' %}.

  2. 2

    Put the Cookifi script first in the head block

    Override the block layout_head_javascript_hmr_mode: emit the Cookifi <script> tag, then {{ parent() }}. Dropping {{ parent() }} kills the Storefront JavaScript bundle, so keep it.

  3. 3

    Install and assign the theme

    Admin → Extensions → My extensions → install and activate, then assign the theme under Sales Channels → Storefront → Theme.

  4. 4

    Compile and clear

    Run bin/console theme:compile && bin/console cache:clear. A reverse proxy in front of the shop may still serve the old HTML until its cache is cleared too.

  5. 5

    Turn the native notice off

    Settings → Shop → Basic information → Legal and compliance: untick 'Use default cookie notification' so the shop does not render two banners.

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 Shopware 6

Because the core sends no gtag consent commands, Consent Mode v2 has to come from the CMP. Cookifi replaces the native manager and pushes the defaults itself; if you keep the native manager on as well, subscribe to document.$emitter's COOKIE_CONFIGURATION_UPDATE and mirror the state. Note that changing the cookie configuration changes the cookie-config-hash, which re-prompts every visitor.

What the native Shopware 6 banner cannot do

Cookie consent manager

  • No script blocking. It sets and removes cookies and emits a COOKIE_CONFIGURATION_UPDATE event; gating the actual scripts is left to each plugin.
  • No Google Consent Mode v2 signalling — the core emits no gtag consent commands at all.
  • No consent log, so there is no proof of consent to show in an audit.
  • Hand-pasted scripts are invisible to it: a cookie only appears in the list if a plugin registers it.

Gotchas worth knowing

  • Forgetting {{ parent() }} in the overridden block removes the Storefront JavaScript bundle and breaks the shop's own scripts.
  • Theme compile plus cache clear is needed after every change, and an HTTP cache or reverse proxy can keep serving the old head for longer than you expect.
  • Scripts without defer or async block rendering — Shopware's own developer docs warn about it explicitly.

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

Can I install Cookifi on Shopware SaaS?

Not through a plugin: Shopware's cloud product does not allow plugin installation. You need a Store app that supports storefront template changes or header snippets, and then the script goes in through that app.

Do I have to disable the cookie consent manager?

Yes, otherwise visitors see two consent UIs. Untick 'Use default cookie notification' under Settings → Shop → Basic information → Legal and compliance.

Why does the banner not appear after deployment?

Almost always a cache: run theme:compile and cache:clear, then clear the reverse-proxy or Varnish cache. If the HTML has the script tag but nothing renders, check the browser console for a blocked request.

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.