Consentl for Shopware 6
The Consentl plugin for Shopware 6.6 and 6.7 puts the banner first in <head>, replaces the Shopware cookie bar and keeps cookie groups in sync with each choice.
- Loader first in <head>
- Yes
- Download
- consentl-shopware-1.1.1.zip · Version 1.1.1 · 164 KB · SHA-256
The Consentl plugin connects your Shopware shop to Consentl. It stores the site key per sales
channel, prints the loader as the first element of <head>, replaces the Shopware cookie bar, and
passes each choice to Shopware's cookie groups so the wishlist, YouTube elements, Google Analytics
and other features follow it. Texts, colours, regions and consent records are managed in the
Consentl dashboard.
Requirements
- Shopware 6.6 or 6.7, PHP 8.2 or later.
- A Consentl account (Free plan available).
Install
From the zip (Downloads):
- In the administration, go to Extensions → My extensions → Upload extension and choose the zip, or run on the server:
bin/console plugin:zip-import consentl-shopware-<version>.zip
bin/console plugin:install --activate ConsentlConsent
bin/console cache:clear
- Install and activate Consentl, then clear the cache.
The plugin's storefront script is copied to public/bundles/consentlconsent/ on activation; run
bin/console assets:install if you deploy without the plugin lifecycle.
Connect your site
Open Extensions → My extensions → Consentl → Configure. Settings apply per sales channel and inherit from "All Sales Channels".
- Connect with Consentl signs you in, lets you pick or create the site and saves the key for the selected sales channel.
- Or paste the site key (
sk_+ 24 characters) from the dashboard and save.
Configure
| Setting | Default | Notes |
|---|---|---|
| Show the Consentl banner | on | Off = the loader is not printed; the key is kept |
| Replace the Shopware cookie bar | on | Hides Shopware's cookie bar and cookie settings dialog |
| Sync consent with Shopware cookie groups | on | See below |
| Category for unknown cookie groups | Marketing | For groups added by other extensions that cannot be matched |
| Banner language | Automatic | The language of the sales channel domain (de-AT → de) |
Cookie groups. Shopware's groups map to Consentl categories: technically required → necessary,
comfort features → preferences, statistics → analytics, marketing → marketing. Other groups are
matched by keyword or use the fallback category. When a visitor decides, the plugin writes the same
cookies Shopware itself would write (wishlist-enabled, youtube-video,
google-analytics-enabled, …) and announces the change, so extensions that listen for consent
changes react without a reload. Links to Shopware's cookie settings open the Consentl preferences.
Widgets. Shopping Experiences block Consentl (category Text) with the elements cookie declaration, privacy request form and withdrawal form. In themes you can also use the Twig includes:
{% sw_include '@ConsentlConsent/storefront/consentl/widget.html.twig' with { consentlType: 'declaration' } %}
{% sw_include '@ConsentlConsent/storefront/consentl/settings-link.html.twig' %}
consentlType can be declaration, request or withdrawal.
Check that it works
- View the page source of your storefront:
<head>starts with<script src="https://api.consentl.com/v1/loader.js?k=…&l=de">. - The Shopware cookie bar no longer appears; the Consentl banner does.
- Reject all: the cookies
google-analytics-enabled,wishlist-enabledandyoutube-videoare not set and Google Analytics does not load. Accept analytics:google-analytics-enabled=1is set without a reload.
For developers
In Twig, {% if consentl_allowed('marketing') %}…{% endif %} checks a stored decision. It sees only
the consentl cookie (not region defaults) and is evaluated when the page is rendered, so pages from
Shopware's HTTP cache are not re-evaluated. Prefer client-side blocking:
<script type="text/plain" data-consentl="analytics">…</script>.
Limitations
- "Keep Shopware cookie bar" (replace off) runs two consent interfaces; use it only for a transition.
- Shopware 6.7 includes its own revocation (withdrawal) request form. Use either Shopware's or Consentl's withdrawal form, not both.
- The Connect flow uses the administration's host as the domain; add your storefront domains in the Consentl dashboard if they differ.
Related guides
Stuck? Write to [email protected] — we answer in English on business days.