Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

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.

Integration Configuration

Configuration depends on which integration is chosen.

Cookiebot by Usercentrics

If you use Cookiebot, enable the integration, choose appropriate integration type and configure domain group id.

image-20240308-081802.png
 Where 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.

image-20240308-081828.png
 Where 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.

image-20240308-075746.png

Google Consent Mode

Both integrations of cookie management platform - Usercentrics CMP and Cookiebot, have a support for Google Consent Mode v2. To enable it, webpage needs to set default consent settings in prior, before loading Google Tag Manager. Our extension adds default consent configuration snippet to the right place in the codebase, and the default consent settings can be configured in the admin panel.


To enable Google Consent Mode support, enable it in the Magesuite->Usercentrics->Google Consent Mode and configure default consent settings

image-20240308-082357.png

If enabled, the following script is being added to the top of the page:

 <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:

  • No labels