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 measurement tools for the specified purposes when consent has been given by the user.

Note: Consent Mode for web pages 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 (web only): 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 measurement functions will be processed with their default behaviors.

When consent for ad storage or analytics storage is denied, the associated Google measurement functions deployed via global site tags (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 (web only)
    • 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 (web only)

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.

The default behaviors work as if all consent options are granted:

ad_storage='granted' and analytics_storage='granted'

Web

Mobile apps

  • Cookies pertaining to advertising may be read and written.
  • IP addresses are collected.
  • The full web page URL, including ad-click information in URL parameters (e.g., GCLID / DCLID) is collected.
  • Third-party web cookies previously set on google.com and doubleclick.net, and first-party conversion cookies (e.g., _gcl_*) are accessible.
  • Advertising identifiers (e.g., Advertising ID / IDFA) may be collected.
  • The app-instance ID generated by the Google Analytics for Firebase SDK is collected.

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

ad_storage='denied'

Web

Mobile apps

  • 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.
  • No Advertising ID, IDFA, or IDFV may be collected.
  • 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.

ad_storage='denied' and ads_data_redaction=true

Web

  • 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'

Web

Mobile apps

  • 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.
  • Events without device or user identifiers will be sent to Google Analytics for basic measurement and modeling purposes.

Set up consent mode

When you’re ready, learn more about how to set up consent mode:

Was this helpful?
How can we improve it?

Need more help?

Sign in for additional support options to quickly solve your issue