Cookie Consent and Google Tag Manager Integration for Magento 2
- Compatibility
- 2.4.9, 2.4.8, 2.4.7, 2.4.6, 2.4.5, 2.4.4, 2.4.3, 2.4.2, 2.4.1, 2.4.0, 2.3.7, 2.3.6, 2.3.5, 2.3.4
Description / Cookie Consent and Google Tag Manager Integration for Magento 2
MAGENTO 2 · COOKIE CONSENT · GOOGLE TAG MANAGER
Customer preferences at the center of your analytics.
Kowal Cookie Consent
Kowal Cookie Consent combines a responsive cookie banner with preference handling and Google integration. Manage the appearance, GTM and GTag IDs, and consent signals from the Magento admin panel.
Banner and preferences · GTM + GTag · Luma and Hyvä
HOW IT WORKS IN PRACTICE
01 · Set up the banner and integration
In the admin panel, you define the appearance, Google IDs, and privacy policy.
02 · The customer chooses preferences
The banner enables an informed choice about cookies.
03 · The module updates consent signals
Saved preferences support control over properly configured tags.
What does your store gain?
Explore the module features, usage, and settings you can adapt to your sales process.
Cookie Consent with Google Tag Manager integration
Cookie Consent Module with Google Tag Manager Integration for Magento 2 is a solution that supports privacy management, including GDPR-related processes, and enables users to knowingly give consent for cookies. The module not only displays an elegant cookie consent banner, but also integrates Google Tag Manager (GTM), enabling real-time cookie consent management.
Main module features
- GDPR support: The module supports collecting informed consent and managing user preferences. Overall store compliance also depends on tag configuration, notice content, and the way data is processed.
- Dynamic integration with Google Tag Manager: The module enables dynamic insertion of the Google Tag Manager
TAG_IDwithout modifying the source code. - Easy configuration: The user can manage the Google Tag Manager ID directly from the Magento 2 admin panel, making marketing campaign and analytics management simple and intuitive.
- Cookie consent banner: An elegant and responsive cookie consent banner that appears automatically on the store homepage and can be easily customized to individual needs.
- User preference support: The module saves users cookie choices and automatically adjusts the Google Tag Manager configuration.
Why choose our module?
The Cookie Consent Module with Google Tag Manager Integration for Magento 2 is an essential tool for every online store owner who cares about compliance with privacy protection regulations and wants full control over analytics and marketing campaigns. With dynamic configuration and easy GTM integration, you can adapt consent and tag handling to your store needs and privacy processes.
Benefits of using the Cookie Consent module
- Improved legal compliance: Supports GDPR and privacy processes through clear consent management, which can help build customer trust.
- Better optimization of marketing campaigns: Thanks to dynamic integration with Google Tag Manager, you can precisely control how tags operate depending on user consent, after the GTM container has been properly configured.
- Ease of use: Simple configuration and management without the need to modify the site code.
- Responsive design: The cookie consent banner is fully responsive and adapted to different devices, ensuring a consistent user experience.
- Time savings: Fast module installation and configuration allows for efficient deployment in your store.
How does the module work?
After installing the module, the Magento 2 store administrator can easily enter the Google Tag Manager ID (TAG_ID) in the module configuration available in the admin panel. The module automatically displays the cookie consent banner on the store homepage. Users can consent to cookies, which dynamically enables Google Tag Manager tags according to their preferences. All user preferences are saved, allowing precise control over their website experience and regulatory compliance.
Consent, analytics, and marketing under control
Our Cookie Consent Module with Google Tag Manager Integration for Magento 2 is an indispensable tool that combines data protection consent handling with advanced analytics and tag management capabilities. With this module, you can focus on growing your business while using mechanisms that support user privacy management.
Settings tailored to your store
In Stores → Configuration → General → Cookie Consent Configuration, you set the module status, GTM ID, Google GTag ID, website name, and privacy policy URL. If Google GTag is already installed by another module, you can indicate this in the configuration.
You can choose the banner and consent type, language, color palette, and the colors and sizes of texts and buttons. Preferences are saved, and Google consent signals are updated according to the supported levels.
Luma and Hyvä support
The package includes the optional Kowal_CookieConsentHyva module. For the Hyvä store view, enable the adapter and the Enable Hyva compatibility setting. On Luma, leave the adapter setting disabled. Both themes use the shared banner and preference mechanism.
Installation
Composer package: kowal/module-cookieconsent; module: Kowal_CookieConsent. After installation, enable the module, run the Magento upgrade, deploy static content for the languages you use, and clear the cache. Then configure the banner and Google integration, and check how selection and preference changes work.
From configuration to results
1. Set up the banner and integration
In the admin panel, you define the appearance, Google IDs, and privacy policy.
2. The customer chooses preferences
The banner enables an informed choice about cookies.
3. The module updates consent signals
Saved preferences support control over properly configured tags.
One configuration, clear choice
Example: a customer opens the store, chooses cookie preferences, and can return later to update them. The module handles saving the choice and updating Google consent signals.
You adapt the GTM container, notice content, and privacy processes to the way your store operates.
Connect consent handling with Google configuration
Want to tailor the module to your store? Ask about implementing Kowal Cookie Consent and discuss configuration or required extensions.
More Information
| Theme compatibility | Luma / Blank, KOWAL |
|---|
Questions and Answers
Does the module integrate with Google Tag Manager (GTM) and allow tags to be controlled based on the user's consent?
Can the administrator enter their own GTM ID (TAG_ID) in the Magento panel without editing the code?
Can the user choose which types of cookies they accept (e.g., marketing, statistics, functional)?
Does installing the module require modifying Magento core files or the theme?
Does the consent banner work properly on mobile devices?
Does the module save the user's cookie choices so that their preferences are respected on subsequent visits?
Does the module affect the store’s operation or performance?
Is the module compatible with newer versions of Magento 2 (e.g., 2.4.x)?
Do I receive technical support and updates after purchasing the module?
Module Installation Instructions
Installation
* In a production environment, please use the --keep-generated option
Type: Composer
- The module is available in the composer repository:
- Kowal Composer repository:
https://repo.kowal.store
- Kowal Composer repository:
- Add the composer repository to the configuration:
Access credentials for the Composer repository (customer email address and license token) will be sent to you by email after purchase. They are also available in the customer panel after logging in at kowal.store. Replace
TWOJ_EMAIL_KLIENTAwith your account email address andTWOJ_TOKENwith the token you received. Run the commands in the Magento root directory.composer config repositories.kowal composer https://repo.kowal.store - Configure access to the Kowal Composer repository:
composer config http-basic.repo.kowal.store 'TWOJ_EMAIL_KLIENTA' 'TWOJ_TOKEN' - Install the module using Composer:
composer require kowal/module-cookieconsent - Apply database updates:
php bin/magento setup:upgrade - Clear the cache:
php bin/magento cache:flush