Consent mode (beta)

Consent mode (beta) allows you to adjust how your Google tags behave based on the consent status of your users. You can indicate whether consent has been granted for Analytics and Ads cookies. Google's tags will dynamically adapt, only utilizing cookies for the specified purposes when consent has been given by the user.

Note: Consent Mode must be implemented in a way that loads the tags before the consent dialog appears. This way, Google tags will adjust their behavior according to the user's cookie consent choice. Ensure that your implementation loads Google tags in all cases, not only if the user consents, or Google will not receive the necessary pings for accurate measurement.

Products that support consent mode include:

  • Google Ads*
  • Floodlight
  • Google Analytics

* includes Google Ads Conversion Tracking and Remarketing; support for Phone Call Conversions pending.

Once consent mode is deployed, it will adjust the behavior of these types of pings:

  • Consent status pings: Consent status pings are sent from each page the user visits where consent mode is implemented, as well as if the consent state changes (e.g., if the user opts in). These pings communicate the consent state (i.e. granted or denied) for each consent type (e.g. ad storage, analytics storage).
  • Conversion pings: Conversion pings are sent to indicate that a conversion has occurred.
  • Google Analytics pings: Google Analytics pings are sent on each page of a website where Google Analytics is implemented and upon events being logged.

When consent is granted, the associated tags will function normally.

When consent for ad storage or analytics storage is denied, the associated Google tags deployed via gtag.js or Google Tag Manager will adjust their behavior accordingly.

In all cases, pings may include:

  • Functional information (such as headers added passively by the browser):
    • Timestamp
    • User Agent
    • Referrer
  • Aggregate / non-identifying information:
    • An indication for whether or not the current page or a prior page in the user's navigation on the site included ad-click information in the URL (e.g., GCLID / DCLID)
    • Boolean information about the consent state
    • Random number generated on each page load

Consent mode behavior

Additionally, consent and conversion pings may include the following behaviors depending on the state of the consent settings and the configuration of your tags.

There is only one set of behaviors for when all consent options are granted:

ad_storage='granted' and analytics_storage='granted' (Default):

  • Cookies pertaining to advertising may be read and written.
  • IP addresses are collected.
  • The full page URL, including ad-click information in URL parameters (e.g., GCLID / DCLID) is collected.
  • Third-party cookies previously set on google.com and doubleclick.net, and first-party conversion cookies (e.g., _gcl_*) are accessible.

When one or more forms of consent are not granted, there are additional behaviors to consider:

ad_storage='denied':

  • No new cookies pertaining to advertising may be written.
  • No existing first-party advertising cookies may be read.
  • Third-party cookies previously set on google.com and doubleclick.net may be sent in request headers (but limited to use for spam and fraud purposes).
  • Google Analytics will not read or write Google Ads cookies, and Google signals features will not accumulate data for this traffic.
  • IP addresses are used to derive IP country, but are never logged by our Google Ads and Floodlight systems and are immediately deleted upon collection. Note: Google Analytics collects IP addresses as part of normal internet communications. Learn more about IP anonymization in Google Analytics.
  • Full page URL is collected, including ad-click information in URL parameters (e.g., GCLID / DCLID).

ad_storage='denied' and ads_data_redaction=true:

  • No new cookies pertaining to advertising may be written.
  • No existing advertising cookies may be read.
  • Requests are sent through a different domain to avoid previously set third-party cookies from being sent in request headers.
  • Google Analytics will not read or write Google Ads cookies, and Google signals features will not accumulate data for this traffic.
  • Ad-click identifiers (e.g., GCLID / DCLID) in consent and conversion pings are redacted.
  • IP addresses used to derive IP country, but are never logged by our Google Ads and Floodlight systems and are immediately deleted upon collection. Note: Google Analytics collects IP addresses as part of normal internet communications. Learn more about IP anonymization in Google Analytics.
  • Page URLs with ad-click identifiers are redacted.

analytics_storage='denied':

  • Will not read or write first-party analytics cookies.
  • Cookieless pings will be sent to Google Analytics for basic measurement and modeling purposes.
  • Google Optimize is not affected by this setting.

Set up consent mode

When you’re ready, learn more about how to set up consent mode and adjust tag behavior based on consent.

Was this helpful?
How can we improve it?

Need more help?

Sign in for additional support options to quickly solve your issue