Tag for age treatment (TFAT)
The age treatment setting is a tool to help you manage your compliance with the General Data Protection Regulation (GDPR), the Children’s Online Privacy Protection Act (COPPA) the Age Appropriate Design Code (AADC), and the Australia Online Safety Act (AU OSA), or other applicable laws or regulations.
Please remember that Google's tools do not relieve you of your obligations under the law. Consult your legal counsel to determine the age treatment settings for your users based on your legal and regulatory requirements.
The following guidelines describe how to mark your tags as age restricted and include the following topics.
If you're using Google's advertising services and would like to implement age restricted treatment at the site or app level, rather than in your ad requests, you can also use TFAT. Refer to Tag a site or ad request for age restricted treatment. Note that as the content owner in control of your site or app, you generally control how your content is treated with respect to COPPA. Even without notice from you, in some cases Google may begin to treat your site or app as child restricted pursuant to our own obligations under COPPA. In these cases, we will attempt to notify you and you may use our tools to specify a particular treatment.
About age treatment settings
The following settings let you specify how the Google handles ad requests for different age treatments:
- CHILD: Indicates that ad requests should receive child age treatment. Child age treatment is specified by the value 1. This results in specific ad request behaviors, such as:
- Personalized ads and remarketing are disabled.
- Requests to third-party ad vendors, such as ad measurement pixels and third-party ad servers, are disabled.
- Ad-serving protections for children are applied.
- TEEN: Indicates that ad requests should receive teen age treatment. Teen age treatment is specified by the value 2. This results in specific ad request behaviors, such as:
- Personalized ads and remarketing are disabled.
- Ad-serving protections for teens are applied.
- UNSPECIFIED: Indicates that no specific age treatment has been set for ad requests. This is the default state and specified by the value 0.
Google Publisher Tags (GPT)
If you're using GPT, you can mark an ad request with child restricted treatment by using the following API call:
googletag.pubads().setPrivacySettings({ tagForAgeTreatment: 1,});
Set the age treatment value to 2 to mark the ad request for teen treatment, to 1 to mark the ad request for child treatment, or to 0 for ad requests that have no child or teen treatment.
To ensure the options you specify take effect before any ads are requested for the page, make the setPrivacySettings(...) GPT API call early in the execution of your page. If you do not make the call early enough, the age restricted treatment may not be taken into account for every ad request. For example, you need to ensure your call to setPrivacySettings(...) is run before any call to googletag.enableServices(), googletag.pubads().display(...), and googletag.pubads().definePassback(...).display() (not an exhaustive list).
If you're using asynchronous mode, subsequent calls to refresh any ad slots (using googletag.pubads().refresh) will take into account changes made using setPrivacySettings(...) since the last request for the ad slot.
Examples of synchronous GPT code snippet
Example for child treatment</script>
<script type='text/javascript'> googletag.pubads().setPrivacySettings({ tagForAgeTreatment: 1,}); googletag.defineSlot('/1234/sports/football', [728, 90],'div_1') .addService(googletag.pubads()); googletag.pubads().enableSyncRendering(); googletag.enableServices();
</script>
</script>
<script type='text/javascript'> googletag.pubads().setPrivacySettings({ tagForAgeTreatment: 2,}); googletag.defineSlot('/1234/sports/football', [728, 90],'div_1') .addService(googletag.pubads()); googletag.pubads().enableSyncRendering(); googletag.enableServices();
</script>
</script>
<script type='text/javascript'> googletag.pubads().setPrivacySettings({ tagForAgeTreatment: 0,}); googletag.defineSlot('/1234/sports/football', [728, 90],'div_1') .addService(googletag.pubads()); googletag.pubads().enableSyncRendering(); googletag.enableServices();
</script>
Examples of asynchronous GPT code snippet
Example for child treatment</script>
<script type='text/javascript'> googletag.cmd.push(function() { googletag.pubads().setPrivacySettings({ tagForAgeTreatment: 1,}); googletag.defineSlot('/1234/sports/football', [728, 90],'div_1') .addService(googletag.pubads()); googletag.enableServices(); });
</script>
</script>
<script type='text/javascript'> googletag.cmd.push(function() { googletag.pubads().setPrivacySettings({ tagForAgeTreatment: 2,}); googletag.defineSlot('/1234/sports/football', [728, 90],'div_1') .addService(googletag.pubads()); googletag.enableServices(); });
</script>
</script>
<script type='text/javascript'> googletag.cmd.push(function() { googletag.pubads().setPrivacySettings({ tagForAgeTreatment: 0,}); 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 a Google Ad Manager publisher to another publisher, whether or not they use Google Ad Manager ad serving or a third-party ad server. Tags are sent from Google Ad Manager publisher A to publisher B, where they are trafficked using the publisher B ad server.
If you're using GPT passback tags, you can mark an ad request with child restricted treatment by including the following in your API call:
setPrivacySettings({ tagForAgeTreatment: 1,});
Set the age treatment value to 2 to mark the ad request for teenage restricted treatment, to 1 to mark the ad request for child restricted treatment, or to 0 for ad requests that have no child or teenage restricted treatment.
When using passback tags, the initial ad is requested from Google Ad Manager for publisher A using either TFAT=2 (teen), TFATTFCD=1 (child), TFATTFCD=0 (unspecified). When the creative is served into the page, the %%TFAT%% 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 %%TFAT%% macro will only work where both publisher A and publisher B use Google Ad Manager ad serving.
Examples of GPT passback code snippet
Example for child treatment.display();
</script>
.display();
</script>
.display();
</script>
.display();
</script>
Learn more about GPT passback tags and Google Ad Manager macros.
Simple URLs
If you're using simple URLs, you can mark an ad request with an age restricted treatment by adding the tfat=[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 tfat=1 to mark the ad request for child treatment, tfcd=2 to mark the ad request for teenage treatment, or tfcd=0 for ad requests that have no child or teen restricted treatment. For example:
https://securepubads.g.doubleclick.net/gampad/ad?tfat=1&iu=/12345/adunit&sz=728x90&c=12345