For me, 100% customer satisfaction is both a concern and a promise to you."
Google Consent Mode is a new way for your website to measure conversions and get analytic insights while being fully compliant with GDPR when using services like Google Analytics, Google Tag Manager (GTM) and Google Ads.
In short, Google Consent Mode bridges the gap between privacy and data-driven advertising by ensuring that your website’s analytics and marketing can be executed seamlessly based on each user’s consent.
Google Consent Mode is an API that allows your website to run all of Google’s services based on user consent, meaning your users’ consent status is the deciding factor in how Google’s tags and scripts behave on your website.
Google Consent Mode introduces two new tag settings that manage cookies for analytics and advertising purposes on your website.
Both values can be either “granted” or “denied”.
With the “analytics_storage” tag setting, Google Consent Mode controls the behavior of statistics cookies on your website based on the consent status of your end users.
This means that the user’s consent status is now transmitted to Google via the Google Consent API. Now, if a user does not give consent, Google provides aggregated and non-identifying metrics. These are fantastic innovations, as now you can get data on the above tools even without consent. But you still act DSGVO compliant, because it is only a projection.
With the “ad_storage” tag setting, Google Consent Mode controls the behavior of marketing cookies on your website based on the consent status of your end users.
Your website may display contextual advertising based on anonymous data instead of targeted advertising based on personal data.
Google Consent Mode allows your website to measure conversions for a specific campaign at an aggregate level, rather than at the level of individual users. This gives you insights into the performance of your performance marketing campaigns in a fully GDPR-compliant way, regardless of the consent of the respective users.
Google Consent Mode works with the following Google tags provided via gtag.js and “Web” containers in Google Tag Manager:
It is important that you include the following code in the code before loading it Google Tag Manager. You can also read the whole thing in Google’s https ://developers.google.com/gtagjs/devguide/consent guide.
The important thing here is to ask yourself the following questions before integrating Google Consent Mode:
<script>
// Include the following lines to define the gtag() function when
// calling this code prior to your gtag.js or Tag Manager snippet
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
// Call the default command before gtag.js or Tag Manager runs to
// adjust how the tags operate when they run. Modify the defaults
// per your business requirements and prior consent granted/denied, e.g.:
gtag('consent', 'default', {'ad_storage': 'denied'});
// Optionally turn on URL passthrough to pass ad click
// information in query parameters from page to page on your site
gtag('set', 'url_passthrough', true);
</script>
<!-- Load gtag.js or Tag Manager as normal, e.g.: -->
<script async src="https://www.googletagmanager.com/gtag/js?id=GA_MEASUREMENT_ID">
</script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'GA_MEASUREMENT_ID');
gtag('config', 'AW_CONVERSION_ID');
</script>
<script>
// Call the update command when your consent status changes
// (e.g. after a visitor grants consent). Modify the updates per
// your business requirements and what consent is granted, e.g.:
gtag('consent', 'update', {'ad_storage': 'granted'});
</script>
Quelle: https://developers.google.com/gtagjs/devguide/consent