本页内容
年龄处理方式标记 (TFAT)
年龄处理方式设置是一种工具,可帮助您遵守《一般数据保护条例》(GDPR)、《儿童在线隐私保护法》(COPPA)、《适龄设计规范》(AADC) 和《澳大利亚网络安全法》(AU OSA) 或者其他适用法律或法规。
您可以详细了解 GDPR 和 AADC 给发布商带来了哪些影响。
请注意,Google 的工具并不能免除您按照法律规定所需承担的义务。请咨询您的法律顾问,依据自身法律及监管要求,为用户确定年龄处理方式设置。
年龄处理方式设置简介
您可以通过以下设置,指定 Google 如何针对不同的年龄处理方式来处理广告请求:
- CHILD:表示广告请求应采用面向儿童的处理方式。面向儿童的处理方式由值 1 指定。这会导致特定的广告请求行为,例如:
- 系统将停用个性化广告和再营销功能。
- 系统将停用向第三方广告供应商(例如广告效果衡量像素和第三方广告服务器)发送请求的功能。
- 系统将应用面向儿童的广告投放保护措施。
- TEEN:表示广告请求应采用面向青少年的处理方式。面向青少年的处理方式由值 2 指定。这会导致特定的广告请求行为,例如:
- 系统将停用个性化广告和再营销功能。
- 系统将应用面向青少年的广告投放保护措施。
- UNSPECIFIED:表示未针对广告请求设置任何特定的年龄处理方式。这是默认状态,由值 0 指定。
如果您同时设置了年龄处理方式和 TFCD/TFUA,Google 会采用最保守的处理方式。
使用 JavaScript 代码标记请求
异步广告代码 (adsbygoogle.js) 示例
如果您的网页使用异步广告代码 (adsbygoogle.js) 向 AdSense 请求广告(AdSense 内容广告),那么,要请求适合采用“受限的数据处理”模式的广告,您需要在每段广告代码中加入 data-tag-for-age-treatment 参数。
面向儿童的处理方式示例
<script async src="/p/https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1234567890123456" crossorigin="anonymous">
</script>
<ins class="adsbygoogle"
style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-1234567890123456"
data-ad-slot="0123456789"
data-tag-for-age-treatment="1"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
面向青少年的处理方式示例
<script async src="/p/https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1234567890123456" crossorigin="anonymous">
</script>
<ins class="adsbygoogle"
style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-1234567890123456"
data-ad-slot="0123456789"
data-tag-for-age-treatment="2"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
不设置特定年龄处理方式的示例
<script async src="/p/https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1234567890123456" crossorigin="anonymous">
</script>
<ins class="adsbygoogle"
style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-1234567890123456"
data-ad-slot="0123456789"
data-tag-for-age-treatment="0"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
旧版同步广告代码 (show_ads.js) 示例
如果您使用旧版同步广告代码 (show_ads.js),那么您需要在每段广告代码中设置 google_tag_for_age_treatment 变量。
面向儿童的处理方式示例
<script>
google_ad_client = "ca-pub-1234567890123456";
google_ad_slot = "0123456789";
google_ad_width = 125;
google_ad_height = 125;
google_tag_for_age_treatment = 1;
</script>
<script src="/p/https://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
面向青少年的处理方式示例
<script>
google_ad_client = "ca-pub-1234567890123456";
google_ad_slot = "0123456789";
google_ad_width = 125;
google_ad_height = 125;
google_tag_for_age_treatment = 2;
</script>
<script src="/p/https://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
不设置特定年龄处理方式的示例
<script>
google_ad_client = "ca-pub-1234567890123456";
google_ad_slot = "0123456789";
google_ad_width = 125;
google_ad_height = 125;
google_tag_for_age_treatment = 0;
</script>
<script src="/p/https://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
使用 <amp-ad> 代码标记请求
为帮助您遵守《一般数据保护条例》(GDPR)/《适龄设计规范》(AADC)(针对欧洲经济区 [EEA]、英国和瑞士使用 TFUA 标记)和《儿童在线隐私保护法》(COPPA)(针对面向儿童的内容使用 TFCD 标记)等全球隐私权法规,您可以将广告请求标记为采用“受限的数据处理”模式。请注意,Google 的工具并不能免除您按照法律规定所需承担的义务。请咨询您的法律顾问,依据自身法律及监管要求,为用户确定年龄处理方式设置。
<amp-ad type="adsense"> 支持通过 amp-consent 组件将请求标记为采用“受限的数据处理”模式。发布商可以利用该组件指明 checkConsentHref 端点,对于指定了 data-block-on-consent 属性的页面,系统会先查询该端点,然后该页面中的任何组件才会发出请求。您可以详细了解 amp-consent 和 ConsentHref 响应的格式。
如果发布商的 ConsentHref 端点返回“tfua”或“tfcd”键,那么后续的 AdSense 请求就会被标记为采用“受限的数据处理”模式。例如,下面这个 AMP 网页包含一个意见征求组件和一个广告:
<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>
来自发布商 ConsentHref (https://publisher.com/api/check-consent) 的以下响应将为该 AdSense 广告请求启用“受限的数据处理”模式:
{
"promptIfUnknown": false,
"sharedData": {
"adsense-tfua": 1,
"adsense-tfcd": 0
}
}
也可以按如下所示使用定位用的 JSON 对象在 <amp-ad> 代码中以静态方式设置 TFUA 和 TFCD,例如:
<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>
最后请注意,为了帮助您遵守这些规定,您也可以为向第三方发出请求的其他 AMP 组件(例如 amp-analytics 和 amp-pixel)设置 data-block-on-consent。