Ad Manager and Ad Exchange program policies

Tag an ad request for EEA users under the age of consent (TFUA)

You can mark your ad requests to receive treatment for users in the European Economic Area (EEA) under the age of consent. This feature is designed to help facilitate compliance with the General Data Protection Regulation (GDPR). Note that you may have other legal obligations under GDPR. Please review the European Union’s guidance and consult with your own legal counsel. Please remember that Google's tools are designed to facilitate compliance and do not relieve any particular publisher of its obligations under the law. Learn more about how the GDPR affects publishers

When using this feature, a TFUA (Tag For Users under the Age of Consent in Europe) parameter will be included in the ad request. This parameter disables personalized advertising, including remarketing, for that specific ad request. It also disables requests to third-party ad vendors, such as ad measurement pixels and third-party ad servers. The parameter does not affect your use of Ad Manager key-values. Consequently, you must ensure that your use of key-values is compliant with GDPR. 

Including the TFUA parameter in an ad request takes precedence over any applicable site-level settings.

If the "Child-directed ads" setting is available in your UI, then the "Limit line item serving" setting for reservation line items only applies if we detect that the request is from the EEA or if you have configured Ad Manager accordingly.*


* This setting allows for the selection of the types of ads that are permitted to serve to users in the European Economic Area (EEA).

If you're using Google's advertising services and would like to request child-directed treatment per COPPA at the site, subdomain, or app level, rather than per ad request, see Tag a site or app for child-directed treatment. Learn more about TFCD and COPPA

The tags for child directed treatment (TFCD) and tag for users under the age of consent (TFUA) should not both simultaneously be set to true. If they are, the tag for child-directed treatment (TFCD) takes precedence.

Google Publisher Tags (GPT)

If you're using GPT, you can mark an ad request for under-the-age-of-consent treatment per GDPR by using the following API call:

googletag.pubads().setTagForUnderAgeOfConsent(int options);

Set the options parameter to the integer value 1 to mark the ad request for under-the-age-of-consent treatment, and to 0 for ad requests that are not under the age of consent.

To ensure the options you specify take effect before any ads are requested for the page, make the setTagForUnderAgeOfConsent GPT API call early in the execution of your page. If you do not make the call early enough, the under-the-age-of-consent flag may not be taken into account for every ad request. For example, you need to ensure your call to setTagForUnderAgeOfConsent is run before any call to googletag.enableServices(), googletag.pubads().display(...), and googletag.pubads().definePassback(...).display() (not an exhaustive list).

Subsequent calls to refresh any ad slots (using googletag.pubads().refresh) will take into account changes made using setTagForUnderAgeOfConsent since the last request for the ad slot.

Once the API call has been made to mark the ad request with a treatment for under the age of consent, the value can be unset. When the value is unset, any further ad requests within the same page view will default to the site-level setting, if applicable. Unset the under age of consent status by using the following API call:

googletag.pubads().setTagForUnderAgeOfConsent()

After the setTagForUnderAgeOfConsent call, all the ad requests that follow will respect the setting until it is changed or cleared.

If both setTagForChildDirectedTreatment  and setTagForUnderAgeOfConsent are called, setTagForChildDirectedTreatment will take precedence. Treatment for TFCD/child-direction will supersede treatment for TFUA/under-the-age-of-consent.

Example GPT code snippet

<script async="async" src="https://securepubads.g.doubleclick.net/tag/js/gpt.js"></script>;

<script>
    window.googletag = window.googletag || {cmd: []};
</script> 
  
<script>
  googletag.cmd.push(function() {
    googletag.pubads().setTagForUnderAgeOfConsent(1);
    googletag.defineSlot('/1234/sports/football', [728, 90],'div_1')
       .addService(googletag.pubads());
    googletag.enableServices();
  });
</script>

GPT passback tags

GPT passback tags can be used to serve ads from an Ad Manager publisher to another publisher, whether or not they use Ad Manager ad serving or a third-party ad server. Tags are sent from Ad Manager publisher A to publisher B, where they are trafficked using the publisher B ad server.

If you're using GPT passback tags, mark an ad request for under-the-age-of-consent treatment per GDPR by including the following in your API call:

setTagForUnderAgeOfConsent(int options);

Set the options parameter to the integer value 1 to mark the ad request for users under the age of consent, and to 0 for ad requests that are not for users under the age of consent.

When using passback tags, the initial ad is requested from Ad Manager for publisher A using either TFUA=1, TFUA=0, or neither. When the creative is served into the page, the %%TFUA%% macro will ‘inherit’ the value from the initial ad request. The ad request to publisher B will be made using the value from the first ad request. Using the %%TFUA%% macro will only work where both publisher A and publisher B use Ad Manager ad serving.

If both TFCD and TFUA are set to 1, TFCD will take precedence.

Learn more about GPT passback tags and macros

Example GPT passback code snippet

<script src="https://securepubads.g.doubleclick.net/tag/js/gpt.js"> googletag.pubads().definePassback("123456/ad/unit", [100,200]) .setTagForUnderAgeOfConsent(1)
    .display();
</script>

Example GPT passback code snippet using the %%TFUA%% macro

<script src="https://securepubads.g.doubleclick.net/tag/js/gpt.js"> googletag.pubads().definePassback("123456/ad/unit", [100,200]) .setTagForUnderAgeOfConsent(%%TFUA%%)
    .display();
</script>

<amp-ad> tags

<amp-ad type="doubleclick"> supports marking requests for under-the-age-of-consent treatment via the amp-consent component. That component allows the publisher to specify checkConsentHref, an endpoint that is queried before requests are sent from any component on the page that specifies the attribute data-block-on-consent. Read more about amp-consent and the format of ConsentHref responses

If the publisher’s ConsentHref endpoint returns the keys "tfua" or "tfcd", subsequent Ad Manager requests will be marked for under-the-age-of-consent or child-directed treatment, respectively. For example, consider an AMP page with a consent component and an ad:

<amp-consent layout="nodisplay" id="consent-element">
<script type="application/json">
{
  "consents": {
    "my-consent": {
      "checkConsentHref": "https://publisher.com/api/check-consent",
      "promptUI": "consent-ui"
    }
  }
}
</script>
</amp-consent>
  
<amp-ad data-block-on-consent
    width=320 height=50
    type="doubleclick"
    data-slot="/4119129/mobile_ad_banner" 
    json='{"targeting":{"sport":["rugby","cricket"]},
      "categoryExclusions":["health"]}'>
</amp-ad>

The following response from the publisher’s ConsentHref (https://publisher.com/api/check-consent) would enable under-the-age-of-consent-treatment for the Ad Manager ad request:

{
  "promptIfUnknown": false,
  "sharedData": {
    "doubleclick-tfua": 1,
    "doubleclick-tfcd": 0
  }
}

TFUA and TFCD can also be set statically on <amp-ad> tags using the targeting JSON object as follows, for example:

<amp-ad data-block-on-consent
    width=320 height=50
    type="doubleclick"
    data-slot="/4119129/mobile_ad_banner"
    json='{"targeting":{"sport":["rugby","cricket"]},
      "categoryExclusions":["health"],
      "tagForChildDirectedTreatment":1,
      "tagForUnderAgeTreatment":1}'>
</amp-ad>

Finally, to help you fully comply with the GDPR requirements, note that data-block-on-consent can also be set for other AMP components that make requests to third parties, such as amp-analytics and amp-pixel.

Simple URLs

If you're using simple URLs, you can mark an ad request for under-the-age-of-consent treatment per GDPR by adding the tfua=[int] parameter directly to the tag request URL. You must specify the parameter early in the tag; to be safe, put it in the first 500 characters. Specify tfua=1 to mark the ad request for users under the age of consent or tfua=0 for ad requests that are not under the age of consent. For example:

https://securepubads.g.doubleclick.net/gampad/ad?iu=/12345/adunit&sz=728x90&tfua=1&c=12345

If both TFCD and TFUA parameters are set to 1, TFCD will take precedence.

Ad Exchange Tags

If your page uses the asynchronous ad code (adsbygoogle.js) to request ads from the Ad Exchange (AdX), request ads suited for users under the age of consent per GDPR by including the parameter data-tag-for-under-age-of-consent="1" in every tag.  For example:

<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js">
</script>
<ins class="adsbygoogle"
    style="display:inline-block;width:728px;height:90px"
    data-ad-client="ca-pub-0123456789abcdef"
    data-ad-slot="0123456789"
    data-tag-for-under-age-of-consent="1"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

If you use the older synchronous ad tag (show_ads.js), then set the variable google_tag_for_under_age_of_consent=1 in every ad tag.  For example:

<script>
google_ad_client = "ca-pub-0123456789abcdef";
google_ad_slot = "0123456789";
google_ad_width = 125;
google_ad_height = 125;
google_tag_for_under_age_of_consent = 1;
</script>
<script src="https://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

Google Mobile Ads SDK

As an app developer, you can indicate whether you want Google to treat your content as suited for users under the age of consent per GDPR when you make an ad request.

You can set tagForUnderAgeOfConsent to indicate whether your content should be treated for users under the age of consent per GDPR. Read the developer documentation for Android and iOS for more information.

Google Interactive Media Ads SDK (for Video)

On video requests, you can indicate that you want Google to treat your video content as for under the age of consent per GDPR, when you append the tfua=1 parameter to your ad tag. You can do this with a manually constructed master video tag or using any of the platform-specific IMA SDKs (HTML5, iOS, or Android).

If your video player uses Ad Manager's Dynamic Ad Insertion feature, it can also include the tfua=1 parameter with a video on demand (VOD) or live stream request to pass the parameter to any included ad requests.

If both TFCD and TFUA parameters are set to 1, TFCD will take precedence.

Was this helpful?
How can we improve it?