PHPackages                             collab/module-consent-mode - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. collab/module-consent-mode

ActiveMagento2-module[Utility &amp; Helpers](/categories/utility)

collab/module-consent-mode
==========================

Cookie Consent Mode Popup Extension for Magento 2

1.2.0(11mo ago)121.9k2MITHTMLPHP ~8.3.0||~8.4.0

Since Feb 24Pushed 11mo ago4 watchersCompare

[ Source](https://github.com/collabpl/magento2-module-consent-mode)[ Packagist](https://packagist.org/packages/collab/module-consent-mode)[ Docs](https://github.com/collabpl/magento2-module-consent-mode)[ RSS](/packages/collab-module-consent-mode/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (3)Versions (9)Used By (0)

Magento 2 GTM Consent Mode v2 Extension
=======================================

[](#magento-2-gtm-consent-mode-v2-extension)

The Collab\_ConsentMode module extends native Magento\_Cookie module in following ways:

- if Collab\_ConsentMode is enabled and Cookie Restriction Mode is set to "Yes" native consent popup is extended with additional checkboxes (for user preferences) and additional buttons which will let them save theirs preferences.

The Collab\_ConsentMode module works in following way:

- by default (when user visitis the page for the first time) we are presenting the user with the consent popup
- on initial visit gtag is fired with following options, those options are saved in the local storage

```
gtag('consent', 'default', {
    'ad_storage': 'denied',
    'ad_user_data': 'denied',
    'ad_personalization': 'denied',
    'analytics_storage': 'denied'
})
```

Please mind that this initialization needs to be done as soon as possible (at least before GTM script is fired) so we are loading gtag's template (block name `consent.initializer`) in `head.additional` block with `before="-"`argument. If Your project is using customized layout please make sure that `consent.initializer` is first block in Yours `head.additional` block or it is placed at least before GTM init script.

- if user changes his preferences, we are firing gtag with new options and saving them in the local storage
- if user visits the page again, we are checking if there are any preferences saved in the local storage and if so we are just using them
- user has an ability to change his preferences at any time by visiting CMS Page with the consent form (module is shipped with dedicated widget for that)

Configuration
-------------

[](#configuration)

You can configure the module in the admin panel under `Stores > Configuration > Collab Extensions > Google Consent Mode v2`.

TabConfig FieldDescriptionGeneralEnabled (bool: Select)If Yes then native consent popup is extended by functionalities provided by this module.GeneralUrl Passthrough (bool: Select)If Yes then minimal information about vistors is passed even without consent. More: [gTag Passthrough](https://developers.google.com/tag-platform/security/guides/consent?consentmode=advanced#passthroughs)GeneralIs Reject Button Visible (bool: Select)If Yes then Reject button is visible in the consent popup.GGeneralReject Button Behaviour (select: Select)If Reject button is visible then you can choose what happens when user clicks on it. Native means that Magento functionality is preserved, 'Save Minimal Set Of Preferences' means that only necesarry checkbox is saved and popup is closed.Installation details
--------------------

[](#installation-details)

```
composer require collab/module-consent-mode
bin/magento setup:upgrade
```

Screenshots
-----------

[](#screenshots)

[![Consent Widget Embeded in CMS Page](docs/cookie_banner.jpeg)](docs/cookie_banner.jpeg)

###  Health Score

42

—

FairBetter than 89% of packages

Maintenance52

Moderate activity, may be stable

Popularity27

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~86 days

Recently: every ~125 days

Total

7

Last Release

330d ago

PHP version history (3 changes)1.0.1PHP ~8.1.0||~8.2.0

1.0.3PHP ~8.1.0||~8.2.0||~8.3.0

1.1.0PHP ~8.3.0||~8.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/408ac0f40cb68772b4f708fe18d561f52550b856e3cac818cda09b631a51ab33?d=identicon)[collab](/maintainers/collab)

---

Top Contributors

[![jemoon](https://avatars.githubusercontent.com/u/3430741?v=4)](https://github.com/jemoon "jemoon (17 commits)")

---

Tags

magentogoogle-analyticsbannermagento2google adscookie-bannerconset mode

### Embed Badge

![Health badge](/badges/collab-module-consent-mode/health.svg)

```
[![Health](https://phpackages.com/badges/collab-module-consent-mode/health.svg)](https://phpackages.com/packages/collab-module-consent-mode)
```

###  Alternatives

[magepal/magento2-googletagmanager

Google Tag Manager (GTM) for Magento 2 with Advance Data Layer

2641.6M5](/packages/magepal-magento2-googletagmanager)[run-as-root/magento2-prometheus-exporter

Magento2 Prometheus Exporter

68353.9k](/packages/run-as-root-magento2-prometheus-exporter)[opengento/module-gdpr

Gdpr Compliance Module for Magento 2

14584.6k](/packages/opengento-module-gdpr)[baldwin/magento2-module-less-js-compiler

Allows Magento 2 to compile less files using the less nodejs compiler

2350.1k](/packages/baldwin-magento2-module-less-js-compiler)[myparcelnl/magento

A Magento 2 module that creates MyParcel labels

1859.0k](/packages/myparcelnl-magento)[friends-of-hyva/magento2-crawler-session

Prevent crawlers from creating a session

166.5k](/packages/friends-of-hyva-magento2-crawler-session)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
