PHPackages                             elgentos/magento2-consentmode-v2 - 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. elgentos/magento2-consentmode-v2

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

elgentos/magento2-consentmode-v2
================================

Consent Mode V2 magento extension for the Hyva theme

1.0.6(1y ago)2030.1k↓28.5%9[3 issues](https://github.com/elgentos/magento2-consentmode-v2/issues)OSL-3.0HTMLPHP &gt;=8.1.0

Since Jun 4Pushed 1y ago8 watchersCompare

[ Source](https://github.com/elgentos/magento2-consentmode-v2)[ Packagist](https://packagist.org/packages/elgentos/magento2-consentmode-v2)[ RSS](/packages/elgentos-magento2-consentmode-v2/feed)WikiDiscussions main Synced 4d ago

READMEChangelog (7)Dependencies (3)Versions (8)Used By (0)

elgentos/magento2-consentmode-v2
================================

[](#elgentosmagento2-consentmode-v2)

This extension is based on the Hyva default cookie bar. All features that are in that extension are in this one.

- [Main Functionalities](#markdown-header-main-functionalities)
- [Installation](#markdown-header-installation)
- [Configuration](#markdown-header-configuration)

Main Functionalities
--------------------

[](#main-functionalities)

This extension:

- Overrides the default Hyva cookie bar
- Sets default consentMode

`gtag('consent', 'default', { 'ad_storage': 'denied', 'ad_user_data': 'denied', 'ad_personalization': 'denied', 'functionality_storage': 'denied', 'personalization_storage': 'denied', 'security_storage': 'denied', });`

- This fires the GTM build in trigger like this:

[![build-in-trigger.png](build-in-trigger.png)](build-in-trigger.png)

- shows banner when consentMode is not set in localstorage or isUserAllowedSaveCookieName (default magento cookie) is null

[![banner.png](banner.png)](banner.png)

- You can click 3 buttons
    - Deny: routes you to the noCookies url you can set in the backend
    - Customize: set the cookies you selected above
    - Allow All: All cookies are allowed (all checkmarks are set)

Logic behind this:

```
{
    'functionality_storage': consent.necessary ? 'granted' : 'denied',
    'security_storage': consent.necessary ? 'granted' : 'denied',
    'personalization_storage': consent.preferences ? 'granted' : 'denied',
    'analytics_storage': consent.statistics ? 'granted' : 'denied',
    'ad_storage': consent.marketing ? 'granted' : 'denied',
    'ad_user_data': consent.marketing ? 'granted' : 'denied',
    'ad_personalization': consent.marketing ? 'granted' : 'denied',
};

```

- When gtag consent default is set, an event is fired in GTM called: `default` When the settings are changed, the `update` event is fired.

As you can see in this example:

[![consent-example.png](consent-example.png)](consent-example.png)

- It adds a button on the absolute bottom of the page so you can always open the cookie settings (this is intentionally not fixed on the viewport)

Would be nice to have multiple events on multiple levels of consent you can add in GTM.

Installation
------------

[](#installation)

1. Install the package into your repository using composer.

```
composer require elgentos/magento2-consentmode-v2

```

2. Enable the Magento module.

```
bin/magento module:enable Elgentos_ConsentModeV2

```

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

[](#configuration)

1. Enable the module in the Magento backend.
    - Navigate to "Stores → Configuration → Extensions → Elgentos → Consent Mode V2".
    - Set the option "Enabled" to yes.

[![img.png](img.png)](img.png)

2. Turn on "Cookie Restriction Mode".
    - Navigate to "Stores → Configuration → General → Web → Default Cookie Settings → Cookie Restriction Mode"
    - Uncheck "Use system value" and set the option "Cookie Restriction Mode" to "Yes".

[![img_1.png](img_1.png)](img_1.png)

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance30

Infrequent updates — may be unmaintained

Popularity39

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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 ~6 days

Total

7

Last Release

724d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/91631a876a2495358801220afbd8d869040f8917b913c21a99b9984ad26634df?d=identicon)[WouterSteen](/maintainers/WouterSteen)

---

Top Contributors

[![WouterSteen](https://avatars.githubusercontent.com/u/5089604?v=4)](https://github.com/WouterSteen "WouterSteen (11 commits)")[![IvoElgentos](https://avatars.githubusercontent.com/u/140594761?v=4)](https://github.com/IvoElgentos "IvoElgentos (4 commits)")[![peterjaap](https://avatars.githubusercontent.com/u/431360?v=4)](https://github.com/peterjaap "peterjaap (4 commits)")[![ArjenMiedema](https://avatars.githubusercontent.com/u/4620826?v=4)](https://github.com/ArjenMiedema "ArjenMiedema (3 commits)")

### Embed Badge

![Health badge](/badges/elgentos-magento2-consentmode-v2/health.svg)

```
[![Health](https://phpackages.com/badges/elgentos-magento2-consentmode-v2/health.svg)](https://phpackages.com/packages/elgentos-magento2-consentmode-v2)
```

###  Alternatives

[fastly/magento2

Fastly CDN Module for Magento 2.4.x

1564.4M1](/packages/fastly-magento2)[loki/magento2-components

Core module for defining Alpine.js components with advanced AJAX features

1011.8k26](/packages/loki-magento2-components)[fishpig/magento2-wordpress-integration

Securely integrate WordPress and Magento 2.

83369.2k7](/packages/fishpig-magento2-wordpress-integration)[run-as-root/magento2-prometheus-exporter

Magento2 Prometheus Exporter

68357.9k](/packages/run-as-root-magento2-prometheus-exporter)[zwernemann/module-withdrawal

Magento 2 EU Withdrawal Button Module - Adds a withdrawal/revocation button for orders in compliance with EU Directive (EU) 2023/2673

245.0k2](/packages/zwernemann-module-withdrawal)[myparcelnl/magento

A Magento 2 module that creates MyParcel labels

1860.2k](/packages/myparcelnl-magento)

PHPackages © 2026

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