Page Summary
-
Consent mode allows Google products to adjust data collection based on user consent, improving the experience for customers using Google products.
-
Integrating consent mode lets websites gather general analytics while respecting user privacy choices by using cookieless pings when consent is denied.
-
CMP providers need to offer solutions for both gtag.js and Google Tag Manager to fully support consent mode integration.
-
For gtag.js integration, provide code snippets for websites, while for Google Tag Manager, the creation and distribution of consent mode templates are recommended.
-
Customers can utilize pre-built templates for GTM from the Community Template Gallery to simplify implementation.
This document gives details on how to integrate consent mode with a consent management platform. As a Consent Management Platform (CMP) provider, you can provide a better experience for customers who use Google products by integrating with Google consent mode.
Consent mode enables Google's measurement system to track consent state across a visitor's journey. Google and third-party tags automatically adjust their behavior based on consent. For example, if a visitor denies consent for ad storage, tags that would normally set ad cookies send measurements without cookies (for example, to the cookieless domain pagead2.googlesyndication.com) instead. For Google Analytics, measurements without third-party cookies are sent to domains like www.google-analytics.com or standard Analytics domains.
Using consent mode instead of manually blocking tags enables your customers to collect generalized measurement information while still respecting their visitors' consent choices. To support consent mode, you will need to provide a solution for each tagging platform your customers use:
- For gtag.js, add code to your platform that customers can utilize on their website. See the gtag.js instructions in Manage consent settings for more information.
For Google Tag Manager (GTM), we strongly recommend creating and publishing consent mode templates. Your customers will use the templates to create tags for their website. See the following articles for more information: