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 將套用最嚴格的處理方式。
透過 AdMob 中介服務轉送年齡處理設定
如果您使用 Google Mobile Ads Flutter Plugin 設定年齡處理方式,中介服務轉接程式會將年齡處理標記信號,轉送至整合的第三方廣告來源。
請參閱下表,瞭解哪些中介服務轉接程式版本,支援將年齡限制處理標記信號轉送至整合的第三方廣告來源:
| 中介服務轉接程式名稱 | 支援的最低版本 |
|---|---|
| AppLovin | 2.6.2 |
| BidMachine | 1.4.1 |
| Chartboost | 1.5.2 |
| DTExchange (Fyber) | 1.3.5 |
| i-mobile | 1.0.5 |
| InMobi | 2.3.0 |
| IronSource | 2.4.3 |
| Liftoff Monetize (Vungle) | 1.5.1 |
| LY (Line) | 2.1.2 |
| maio | 1.1.6 |
| Meta (Facebook) | 1.5.4 |
| Mintegral | 2.1.1 |
| Moloco | 3.5.0 |
| MyTarget | 1.12.0 |
| Pangle | 4.0.0 |
| PubMatic | 2.2.0 |
兒童導向內容設定
為符合《兒童網路隱私保護法》(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或不設定這個標記,表示您未指定是否要對涉及歐洲經濟區內未滿規定年齡使用者的廣告請求,套用相關模式。以下示範如何在廣告請求中表明有意加入 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);