Magento 2 Consent mode's setup guide


  1. Once you have installed the modules “Google Tag Manager Pro Tracking”, “Tracking Base”, ”Cookie Popup” and “GDPR”, enable them and enter the correct license key.

  1. After that, go to “Customers” -> “Manage Cookie Choices” and click on “Add new Cookie Choice” to set up cookie choices in the Cookie Popup extension.

2a. You can do the setup of a new cookie as shown in the below image or you can create your own cookie/s. Please note that “Cookie Name” and “Set by default” are the most important fields as they would be used in the cookie mapping as described in the later steps.

2b. Once you have created a cookie or multiple cookies, your setup should resemble the below image-

  1. Now, go to “System”->”Configuration”->“Tracking Base”. Scroll down and you would see the field “Enable Consent Mode”, enable it in order to enable the consent mode. Then, go to “Cookie mapping”, add the “Consent Param” that are given in the description”(personalization_storage, functionality_storage, security_storage are not mandatory for correct consent setup), set the “Default value” of the consent parameter as “granted” or “denied” based on the “Set by default” (step 2a) value of the cookie. Use the “Cookie Name” that you used while creating the cookies. For example- analytics_storage, if you want to do mapping of this consent param with Analytics cookie then in the field “Cookie name” add “analytics_cookie” because this cookie name was used when you were creating cookies (step 2a). While creating the cookie (in this case Analytics cookie), if the value of “Set by default” is set to “No” then while doing the mapping the “Default value” of the consent param (in this case analytics_storage) that is associated with that cookie should be set to “denied” or vice versa.

On Magento’s end consent mode setup is complete.


  1. Open the container that is connected with our GTM module, go to “Admin”->“Container Settings” and enable consent overview present in the additional settings.

  1. Go to “Workspace”->”Tags” -> click on “Consent Overview” (shield) and set up consent for each tag. Make sure to select “No additional consent required” for Tags that already have “Built-In Consent”. These tags are generally Google related tags.

2a. In order to add “Additional Consent”, click on the tag name and go to ”Consent Settings” and choose “Require additional consent for tag to fire” and add the consent param that you want as “Additional Consent”. If cookies related to the consent parameter that is chosen as an additional consent are not accepted then that tag would not fire.

On GTM’s end consent mode setup is complete.


  1. In order to verify whether the consent mode is working as per the configuration you have set or not, you can preview your changes and compare them with the frontend as shown in the below images. All the values should be the same.

Last updated