Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This module integrates Usercentrics Consent Management into Magento.
It covers both Usercentrics solutions, namely Usercentrics CMP as well as Cookiebot by Usercentrics.
Regardless the module allows enabling Google Consent Mode v2, so adding a JavaScript snippet to the page, that defines default consent settings, which are being read by Google Tag Manager.

Table of Contents
minLevel1
maxLevel6
outlinefalse
styledefault
typelist
printablefalse

Installation

Code Block
composer require "creativestyle/magesuite-usercentrics"

Integration Configuration

...

Expand
titleWhere to find domain group id?

The Domain Group ID can be found in Cookiebot Admin → Implementation (green highlight)

image-20240308-072412.png

Usercentrics CMP

If you use Usercentrics CMP, choose appropriate integration type and configure settings ID.

...

Expand
titleWhere to find settings id?

Settings ID can be found in Usercentrics Admin Panel, in the preview of your sites (green highlight)

image-20240308-072149.png


Preview mode

Usercentrics CMP supports the preview mode, to test settings before deploying changes, in order to see the preview mode status, change the configuration in the Magento Admin Panel, enabling it.

...

Code Block
languagejs
 <script data-defer-ignore="true" data-cookieconsent="ignore">
      window.dataLayer = window.dataLayer || [];
      function gtag() {
          dataLayer.push(arguments);
      }
      gtag("consent", "default", {
          ad_personalization: "denied",
          ad_storage: "denied",
          ad_user_data: "denied",
          analytics_storage: "denied",
          functionality_storage: "denied",
          personalization_storage: "denied",
          security_storage: "granted",
          wait_for_update: 500,
      });
      gtag("set", "ads_data_redaction", true);
      gtag("set", "url_passthrough", true);
  </script>

Final note

This module only adds Usercentrics or Cookiebot integration to the page and default consent settings for Google Consent Mode v2. With these in place, one can start configuring Google Tag Manager, to apply proper consent settings.

Reference links:

...