Markus Michalski FAQ

Klaro Cookie Consent

GDPR-compliant cookie consent management for Sylius 2 with Klaro - admin service catalog, per-channel settings, Google Consent Mode v2, magic-anchor trigger.

Deutsche Version

Back to Sylius Plugins

Klaro Cookie Consent

Sylius
PHP
License

This documentation always describes the latest published version.

Live Demo: Try this and other plugins live, no installation, no risk: demo.markus-michalski.net

Overview

GDPR-compliant cookie consent for Sylius 2 shops, built on top of Klaro (BSD-2-Clause, KIProtect GmbH). In the admin you maintain the catalog of third-party services (Google Analytics, marketing pixels, embeds, ...), and per channel you decide how the dialog behaves and looks.

Opt-in from the start: A channel with no settings row behaves as if the plugin were not installed at all, nothing loads until an administrator explicitly configures and enables the channel.

graph TD
    A["Shop channel"] --> B{"Channel configuration present and enabled?"}
    B -->|"No"| C["Nothing loads"]
    B -->|"Yes"| D["Banner: styles, scripts, footer link"]
    D --> E["Visitor decides in the Klaro dialog"]
    E --> F{"Google Consent Mode v2 active?"}
    F -->|"Yes"| G["gtag consent update per purpose"]
    F -->|"No"| H["Klaro-internal decision only"]

Documentation

Page Content
Installation and operation Installation via Packeton, update, migrations, uninstallation
Configuration Channel settings, service catalog, admin grids, practical examples
Storefront integration Twig functions, hooks, magic anchor, theme notes
Troubleshooting and FAQ Common problems, known limitations, frequently asked questions
Technical details Architecture, plugin structure, tables, extensibility

Features

Feature Description
Admin service catalog Maintain third-party services with purpose, required/default flag, cookies to delete on opt-out, and channel assignment
Channel settings Storage method, dialog behavior (must consent, accept all, group by purpose), colors, banner position and theme per channel
Google Consent Mode v2 Automatically maps consent per service purpose to Google's gtag('consent', ...) keys, with no hardcoded service names
Magic-anchor trigger Any link ending in #mmd-klaro-cookie-settings reopens the dialog
Multi-language Dialog texts are translated via Symfony's translator and baked into window.klaroConfig for the shop's current language
Protected required entry A built-in "Technically necessary" entry is always present, cannot be disabled and needs no consent

Requirements

Requirement Version Notes
Sylius ^2.2 Tested against Sylius 2.2 and 2.3
PHP ^8.3
Symfony ^7.4 symfony/console, symfony/finder, symfony/routing
Database MySQL 8 / MariaDB Migrations use the Doctrine Schema API with no platform guard; other databases are not verified
doctrine/migrations ^3.7

License

License

Commercial license: one license covers one Sylius installation (all channels, plus its development and staging environments). Redistribution is not allowed, updates are included for 12 months from purchase. The bundled Klaro widget (klaro.js/klaro.css) keeps its own BSD-2-Clause license (KIProtect GmbH).

Support

For licensing questions, technical questions or bugs, reach me at support@markus-michalski.net.