J!Extensions Store™
Faq Does the GDPR component for Joomla integrate the Google Consent Mode CMP?
Does the GDPR component for Joomla integrate the Google Consent Mode CMP?

Yes the GDPR component integrates the Google Consent Mode (CMP) v2 that will be in effect starting from March 2024 for Google services.

It's possible to integrate the Google Consent Mode (CMP)for Google AdSense and Google Analytics consents. Such consents can be granted or denied based on user preferences of the GDPR categories and transferred to the Google Consent Mode platform.


In order to enable the integration with Google Consent Mode, the GDPR component just requires to include the Google Tag Manager script (gtag e.g. https://www.googletagmanager.com/gtm.js?id...) and enable the following settings for the 'Statistics' and 'Marketing' categories, then the GDPR component will communicate any consent for ads and analytics to Google, including Google consent mode v2 for the EU user policy.

IMPORTANT: In the case that you have configured the GDPR tool to block the domain 'googletagmanager.com', be sure to allow it and remove all blocks.


Enable Google Consent Mode CMP

In order to have the integration with CMP to take place, typically you include the Google tag snippet in your pages using the code below:

<script async src="https://www.googletagmanager.com/gtag/js?id=TAG_ID"> </script> <script> window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}

gtag('js', new Date());
gtag('config', 'TAG_ID');
</script>


Optionally you can also define the default consents status to 'denied' before the inclusion of Google tag:


<script>
// Define dataLayer and the gtag function.
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}

// Set default consent to 'denied' as a placeholder
// Determine actual values based on your own requirements
gtag('consent', 'default', {
'ad_storage': 'denied',
'ad_user_data': 'denied',
'ad_personalization': 'denied',
'analytics_storage': 'denied',
'wait_for_update': 500 });
</script>


So the final snippet of code to place in your pages would be the following:

<script>
// Define dataLayer and the gtag function.
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}

// Set default consent to 'denied' as a placeholder
// Determine actual values based on your own requirements
gtag('consent', 'default', {
'ad_storage': 'denied',
'ad_user_data': 'denied',
'ad_personalization': 'denied',
'analytics_storage': 'denied',
'wait_for_update': 500 });
</script>

<script async src="https://www.googletagmanager.com/gtag/js?id=TAG_ID"> </script> <script> window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}

gtag('js', new Date());
gtag('config', 'TAG_ID');
</script>



Obviously replace the 'TAG_ID' with your real GTM ID.
For more detailed informations about the snippets of code required for the integration either using gtag or Tag Manager, refer to this page: https://developers.google.com/tag-platform/security/guides/consent



Furthermore it's also possible to activate the Google CMP theme for a seamless integration with the Google Consent Mode v2 by enabling the option below:

Enable Google Consent Mode CMP

Google Consent Mode theme

You can also download a sample configuration of GDPR for the Google CMP v2 as used on the demo site https://demo.storejextensions.org/gdpr.

Keep in mind that any limitation to Google Ads as of January 16, 2024 are related to personalized ads and not to all ads.

If your ads runs correctly with GDPR CMP integration active, you can safely ignore any notification from Google about your site not implementing a CMP, indeed it's limited to the list of those to which a certification applies.