LW IT Solutions
« Blog Overview /Data Privacy / ads_data_redaction in Consent Mode v2: Mechanism, Legal...
Read this article in other languages:

ads_data_redaction in Consent Mode v2: Mechanism, Legal Framework and Configuration

ads_data_redaction in Consent Mode v2: Mechanism, Legal Framework and Configuration
Contents
  1. The Mechanism Behind Data Redaction
  2. The Legal Framework: GDPR and ePrivacy
  3. How to Configure ads_data_redaction
  4. Implementing via Google Tag Manager (Simo Ahava’s Template)
  5. Questions and answers
  6. Sources

The digital advertising landscape is continuously shifting towards privacy-first architectures. With the mandatory rollout of Google Consent Mode v2 for advertisers in the European Economic Area (EEA), compliance mechanisms have become significantly more sophisticated. Alongside the newly introduced parameters ad_user_data and ad_personalization, one critical, yet often overlooked setting remains highly relevant: ads_data_redaction.

The Mechanism Behind Data Redaction

To understand the necessity of this parameter, the default behavior of Consent Mode must first be analyzed. When a user explicitly denies consent for marketing cookies (ad_storage='denied'), Google tags adjust their behavior. They stop reading or writing advertising cookies. However, by default, standard “cookieless pings” are still transmitted back to Google’s servers to maintain basic measurement capabilities.

Comparison of Google Ads and Floodlight requests while ad_storage is denied: by default cookieless pings that can still carry GCLID or DCLID, with ads_data_redaction stripped identifiers, a cookieless domain and redacted page URLs. Below the command order in gtag.js and the template setting in GTM.
The diagram shows what ads_data_redaction removes from advertising requests, why it matters legally and how it is set up in gtag.js and GTM.

The privacy issue arises because these pings can still carry URL query parameters containing ad click identifiers, such as the Google Click Identifier (GCLID) or DoubleClick Identifier (DCLID). These identifiers are highly specific and can potentially be used to trace a user’s journey.

Setting the ads_data_redaction parameter to true fundamentally alters this behavior. When this command is active alongside a denied ad_storage state, the following actions occur:

  • Stripping Identifiers: All ad click identifiers (GCLID, DCLID, wbraid, gbraid) are scrubbed from the network requests sent by Google Ads and Floodlight tags.
  • Cookieless Domain: The network requests are additionally sent through a domain that does not set third-party cookies, such as pagead2.googlesyndication.com.
  • Redacted Page URLs: Page URLs that contain ad click identifiers are redacted in the advertising requests as well. Link decoration itself is not controlled by this parameter, but by url_passthrough.

The Legal Framework: GDPR and ePrivacy

The legal landscape in Europe is governed primarily by the General Data Protection Regulation (GDPR) and the ePrivacy Directive (often referred to as the “Cookie Law”).

According to the GDPR’s principle of Data Minimization (Article 5), only data that is absolutely necessary for a specified purpose should be processed. Furthermore, the ePrivacy Directive mandates that explicit consent must be gathered before storing or accessing information on a user’s device.

Click identifiers like GCLID are widely considered pseudonymous personal data, as they can theoretically be combined with other datasets to single out an individual. Therefore, transmitting these identifiers when a user has explicitly opted out of marketing tracking poses a significant legal risk. By implementing ads_data_redaction, the data collection strictly aligns with the most conservative interpretations of European privacy laws, ensuring that a “denied” state truly means no identifying ad data is processed or transmitted.

How to Configure ads_data_redaction

Configuration requires modifying the global site tag (gtag.js) snippet or adjusting settings within Google Tag Manager. In a direct code implementation, the parameter must be set before the default consent state is declared.

<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  
  /* Set the redaction parameter to true */
  gtag('set', 'ads_data_redaction', true);
  
  /* Define default consent states */
  gtag('consent', 'default', {
    'ad_storage': 'denied',
    'analytics_storage': 'denied',
    'ad_user_data': 'denied',
    'ad_personalization': 'denied'
  });
</script>

Implementing via Google Tag Manager (Simo Ahava’s Template)

For those utilizing Google Tag Manager (GTM), the most efficient and standard way to manage Consent Mode is through the community template created by Simo Ahava, named “Consent Mode (Google tags)”. Configuring data redaction within this template requires no custom coding.

Configuration steps:

  • Adding the Template: The “Consent Mode (Google tags)” template must be added from the GTM Community Template Gallery.
  • Tag Creation: A new tag is created using this template, with the configuration command set to “Default”.
  • Defining States: Default consent states are defined across all required categories (e.g., setting ad_storage to ‘denied’).
  • Enabling Redaction: Within the tag configuration, under the “Other Settings” or “Advanced” section, the specific field for ads_data_redaction (often presented as a “Redact Ads Data” checkbox or dropdown) is located and set to true.
  • Trigger Assignment: The tag is assigned to the earliest possible trigger, which is strictly the “Consent Initialization – All Pages” trigger. This ensures redaction rules are active before any other tags fire.

Questions and answers

Do ads_data_redaction and url_passthrough work against each other, when one removes click identifiers and the other passes them on?

No, because they act on different paths.

ads_data_redaction governs what is sent to Google: when consent is denied, gclid, dclid, wbraid and gbraid are stripped from the requests, and the requests go through a domain that does not set third-party cookies. url_passthrough governs what happens within the site: the identifier stays in the URL when the next link is clicked instead of being lost at the first page change.

Together they form a consistent picture. Google does not learn the click identifier while consent is denied; the site keeps it all the same and can use it as soon as consent is given after all. Treating the two as one and the same setting makes it easy to switch one of them off and then be puzzled that the attribution to the campaign is missing after a later consent: the identifier was already gone by the second page view.

Does gtag(‘set’, ‘ads_data_redaction’, true) have to come before the default command, or is the order a matter of taste?

The order shown in the article is the safe one, even though a different order never shows up as an error.

The command takes effect from the moment it runs. Anything sent before that goes out unredacted. With the redaction placed before the default command, it is guaranteed to be set before the first tag can send a request; placed after it, the outcome depends on nothing firing between the two lines. There is no error message for this case, only an entry in the Network tab that nobody goes looking for.

In Tag Manager the same applies in a different form: the redaction belongs in the same tag as the default and therefore on the same trigger, “Consent Initialization – All Pages”. In a second tag, the order depends on the tag priority, and that is a number someone changes later without knowing the context.

Lukas Wojcik

Lukas Wojcik

Systems architect and technology enthusiast specializing in scalable tracking solutions, GMP Stack (GA4 & GTM), and robust backend architectures. Advocate for clean code and privacy-first design.

Get in Touch

Briefly describe your project or inquiry for a tailored response. This site is protected by reCAPTCHA.

Write a comment

Observations from other implementations, objections and questions are welcome here.

The email address is not published. Required fields are marked with an asterisk.

Articles & categories

CCTV

Follow this category by RSS

Cloud & AI

All 17 articles in this category Follow this category by RSS

Data Privacy

All 19 articles in this category Follow this category by RSS

Digital Analytics

All 58 articles in this category Follow this category by RSS

Digital Marketing

All 37 articles in this category Follow this category by RSS

IT & Networks

All 18 articles in this category Follow this category by RSS

Music Production

All 17 articles in this category Follow this category by RSS

Raspberry PI

Follow this category by RSS

SaaS & Internet Earning

Follow this category by RSS

Smart Home

All 18 articles in this category Follow this category by RSS

Web Development

All 11 articles in this category Follow this category by RSS

WordPress Plugins & Tricks

All 14 articles in this category Follow this category by RSS