Notification

Please make sure to visit Your AdSense Page where you can find personalized information about your account to help you succeed with AdSense.

GDPR overview and guidance

Tag an ad request for EEA, the UK, and Switzerland users for restricted data processing

You can mark your ad requests to receive treatment for users in the European Economic Area (EEA), the UK, and Switzerland for restricted data processing using the TFUA (formerly “Tag For Under the Age of Consent”) tag. This feature is designed to help facilitate compliance with the General Data Protection Regulation (GDPR) and related child privacy regulations, such as the Age Appropriate Design Code (AADC). Note that you may have other legal obligations under the GDPR and AADC. Please review all regulatory 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 and AADC affect publishers.

When using this feature, a TFUA 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.

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

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

Learn more about TFCD and COPPA

The TFCD and TFUA tags should not both simultaneously be set to true. If they are, the TFCD tag takes precedence.

JavaScript tags

If your page uses the asynchronous ad code (adsbygoogle.js) to request ads from AdSense (AFC), request ads suited for restricted data processing 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?client=ignored1234567890123456" crossorigin="anonymous">
</script>
<ins class="adsbygoogle"
    style="display:inline-block;width:728px;height:90px"
    data-ad-client="ignored1234567890123456"
    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 = "ignored1234567890123456";
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>

<amp-ad> tags

<amp-ad type="adsense"> supports marking requests for restricted data processing 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 AdSense requests will be marked for restricted data processing. 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="adsense"
    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 restricted data processing for the AdSense ad request:

{
  "promptIfUnknown": false,
  "sharedData": {
    "adsense-tfua": 1,
    "adsense-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="adsense"
    data-slot="/4119129/mobile_ad_banner"
    json='{"targeting":{"sport":["rugby","cricket"]},
      "categoryExclusions":["health"],
      "tagForChildDirectedTreatment":1,
      "tagForUnderAgeTreatment":1}'>
</amp-ad>

Finally, to help you comply with these 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.

Was this helpful?

How can we improve it?
Search
Clear search
Close search
Google apps
Main menu
15932922253865350166
true
Search Help Center
true
true
true
true
true
157
false
false