Download the PHP package elgentos/magento2-consentmode-v2 without Composer
On this page you can find all versions of the php package elgentos/magento2-consentmode-v2. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download elgentos/magento2-consentmode-v2
More information about elgentos/magento2-consentmode-v2
Files in elgentos/magento2-consentmode-v2
Package magento2-consentmode-v2
Short Description Consent Mode V2 magento extension for the Hyva theme
License OSL-3.0 AFL-3.0
Informations about the package magento2-consentmode-v2
elgentos/magento2-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
- Installation
- Configuration
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:
- shows banner when consentMode is not set in localstorage or isUserAllowedSaveCookieName (default magento cookie) is null
- 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:
- When gtag consent default is set, an event is fired in GTM called:
default
When the settings are changed, theupdate
event is fired.
As you can see in this example:
- 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
-
Install the package into your repository using composer.
- Enable the Magento module.
Configuration
- Enable the module in the Magento backend.
- Navigate to "Stores → Configuration → Extensions → Elgentos → Consent Mode V2".
- Set the option "Enabled" to yes.
- 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".
All versions of magento2-consentmode-v2 with dependencies
magento/framework Version ^103.0
magento/module-cookie Version ^100.4
magento/module-store Version ^101.1