RequestConfiguration 物件會收集每個廣告請求的全域設定,並由 MobileAds.instance.updateRequestConfiguration() 套用。
為確保所有廣告請求都套用請求設定變更,請先更新請求設定,再初始化 Google Mobile Ads Flutter Plugin。
設定年齡處理方式
為協助您遵循兒童與青少年適用的相關隱私權法規,Google Mobile Ads Flutter Plugin 提供了年齡處理設定。您可以設定年齡處理方式,指定 Google Mobile Ads Flutter Plugin 是否應針對兒童、青少年或未指定年齡套用特定的廣告放送保護措施。
您可以在 RequestConfiguration 物件上使用 ageRestrictedTreatment 屬性設定年齡處理方式。
下方範例說明如何為廣告請求設定兒童年齡處理方式:
RequestConfiguration requestConfiguration = RequestConfiguration(
// Indicates that ad requests should have child age treatment.
ageRestrictedTreatment: AgeRestrictedTreatment.child,
);
MobileAds.instance.updateRequestConfiguration(requestConfiguration);
如要設定青少年或未指定年齡處理方式,請將 AgeRestrictedTreatment.child 設定替換為下列內容:
AgeRestrictedTreatment.teenAgeRestrictedTreatment.unspecified
啟用這項設定後,Google Mobile Ads Flutter Plugin 會在廣告請求中納入 tfat 參數。請諮詢法律顧問,根據您應盡的法律與法規義務,決定要對使用者採取的年齡處理方式。詳情請參閱「將應用程式的廣告請求標記為依年齡限制處理」。
從 TFCD 和 TFUA 遷移至年齡處理設定
年齡處理設定將取代已淘汰的
RequestConfiguration.tagForChildDirectedTreatment (TFCD) 和
RequestConfiguration.tagForUnderAgeOfConsent (TFUA) 設定。
下表列出 TFCD 和 TFUA 設定,以及對應的年齡處理方式:
TFCD
TFCD |
年齡處理方式 |
|---|---|
TagForChildDirectedTreatment.yes |
AgeRestrictedTreatment.child |
TagForChildDirectedTreatment.no |
AgeRestrictedTreatment.unspecified |
TagForChildDirectedTreatment.unspecified |
AgeRestrictedTreatment.unspecified |
| 未指派任何值 | AgeRestrictedTreatment.unspecified |
| 無對應報告 | AgeRestrictedTreatment.teen |
TFUA
TFUA |
年齡處理方式 |
|---|---|
TagForUnderAgeOfConsent.yes |
AgeRestrictedTreatment.child |
TagForUnderAgeOfConsent.no |
AgeRestrictedTreatment.unspecified |
TagForUnderAgeOfConsent.unspecified |
AgeRestrictedTreatment.unspecified |
| 未指派任何值 | AgeRestrictedTreatment.unspecified |
| 無對應報告 | AgeRestrictedTreatment.teen |
瞭解年齡處理設定與 TFCD 和 TFUA 的互動
若同時設定年齡處理方式與 TFCD 或 TFUA,Google 將套用最嚴格的處理方式。
針對兒童的設定
根據兒童網路隱私保護法 (COPPA),系統提供「兒童導向內容標記」設定。
應用程式開發人員可以在傳送廣告請求時,指明是否希望 Google 將內容標為兒童導向。如果希望 Google 將內容視為兒童導向,我們就會採取相關行動,對廣告請求停用「按照興趣顯示廣告」(IBA) 功能和再行銷廣告。這項設定可透過 RequestConfiguration.tagForChildDirectedTreatment() 搭配所有版本 Google Play 服務 SDK:
- 使用
TagForChildDirectedTreatment.yes引數,指明要根據 COPPA 將內容視為兒童導向。 - 使用
TagForChildDirectedTreatment.no引數,指明不要根據 COPPA 將內容視為針對兒童的。 - 如果不想在廣告請求中指明應如何依據 COPPA 處理內容,請使用
TagForChildDirectedTreatment.unspecified引數,或不要設定這個標記。
以下範例說明如何依 COPPA 規定,將內容標示為兒童導向:
final RequestConfiguration requestConfiguration = RequestConfiguration(
tagForChildDirectedTreatment: TagForChildDirectedTreatment.yes);
MobileAds.instance.updateRequestConfiguration(requestConfiguration);
未滿規定年齡的使用者
針對未滿規定年齡的歐洲經濟區使用者,您可以在廣告請求中加上相關處理標記。這項功能的立意是協助發布商遵守《一般資料保護規則》(GDPR)。請注意,您可能還有 GDPR 所衍生的其他法律義務。請查看歐盟發布的指南並諮詢您的法律顧問。提醒您,Google 提供工具的用意是協助發布商遵守規定,而非方便發布商規避法定義務。進一步瞭解 GDPR 對發布商的影響。
使用這項功能時,廣告請求將會包含歐洲使用者適用的未滿規定年齡標記 (TFUA) 參數。這個參數會針對特定廣告請求,停用個人化廣告功能 (包括再行銷)。並停止向第三方廣告供應商 (例如廣告評估像素和第三方廣告伺服器) 提出其他請求。
使用 RequestConfiguration.tagForUnderAgeOfConsent() 設定代碼:
- 使用
TagForUnderAgeOfConsent.yes引數,指明您希望以適合未滿規定年齡使用者的方式處理請求設定。 - 使用
TagForUnderAgeOfConsent.no引數,指明您不希望以適合未滿規定年齡使用者的方式處理請求設定。 使用
TagForUnderAgeOfConsent.unspecified引數或不設定這個代碼,表示您未指定廣告請求是否應對歐洲經濟區 (EEA) 未滿規定年齡的使用者,採取相應措施。以下範例說明如何在廣告請求中加入 TFUA:final RequestConfiguration requestConfiguration = RequestConfiguration( tagForUnderAgeOfConsent: TagForUnderAgeOfConsent.yes); MobileAds.instance.updateRequestConfiguration(requestConfiguration);
啟用針對兒童的設定和 setTagForUnderAgeOfConsent 的標記,不可同時設為 true,否則將優先採用兒童導向內容設定。
廣告素材篩選
您可以使用 RequestConfiguration.maxAdContentRating() 設定廣告內容分級:
系統為這些請求傳回的 AdMob 廣告,就不會超過指定的內容分級上限。這項聯播網額外資訊可能的值取決於數位內容標籤分類,且應為下列 MaxAdContentRating 物件之一:
MaxAdContentRating.gMaxAdContentRating.pgMaxAdContentRating.tMaxAdContentRating.ma
下列程式碼會設定 RequestConfiguration 物件,指定傳回的廣告內容所對應的數位內容標籤分級不得高於 G:
final RequestConfiguration requestConfiguration = RequestConfiguration(
maxAdContentRating: MaxAdContentRating.g);
MobileAds.instance.updateRequestConfiguration(requestConfiguration);