指定目標

本指南說明如何為廣告請求提供指定目標資訊。

事前準備

請先設定 Google Mobile Ads Unity Plugin,再繼續操作。

請求設定

RequestConfiguration 物件會收集每個廣告請求的全域設定,並由 MobileAds.SetRequestConfiguration() 套用。

MobileAds.SetRequestConfiguration(requestConfiguration);

為確保所有廣告請求都套用請求設定變更,請先指定請求設定,再初始化 SDK。

設定年齡處理方式

為協助您遵循兒童與青少年適用的相關隱私權法規,Google Mobile Ads Unity Plugin 提供了年齡處理設定。您可以設定年齡處理方式,指定 Google Mobile Ads Unity Plugin 是否應針對兒童、青少年或未指定年齡套用特定的廣告放送保護措施。

您可以在 RequestConfiguration 物件上,使用 AgeRestrictedTreatment 屬性設定年齡處理方式。

下方示範如何為廣告請求設定兒童年齡處理方式:

RequestConfiguration requestConfiguration = new RequestConfiguration
{
    // Indicate that ad requests should have child age treatment.
    AgeRestrictedTreatment = AgeRestrictedTreatment.Child
};
MobileAds.SetRequestConfiguration(requestConfiguration);

如要指定青少年或未指定年齡對象的處理方式,請將 AgeRestrictedTreatment.Child 設定替換為下列內容:

  • AgeRestrictedTreatment.Teen
  • AgeRestrictedTreatment.Unspecified

啟用這項設定後,Google Mobile Ads Unity Plugin 會在廣告請求中納入 tfat 參數。請諮詢法律顧問,根據您應盡的法律與法規義務,決定要對使用者採取的年齡處理方式。詳情請參閱「將應用程式的廣告請求標記為依年齡限制處理」。

從 TFCD 和 TFUA 遷移至年齡處理設定

年齡處理設定將取代已淘汰的 TagForChildDirectedTreatment (TFCD) 和 TagForUnderAgeOfConsent (TFUA) 屬性。

下表列出 TFCD 和 TFUA 設定,以及對應的年齡處理方式:

TFCD

TFCD 年齡處理方式
TagForChildDirectedTreatment.True AgeRestrictedTreatment.Child
TagForChildDirectedTreatment.False AgeRestrictedTreatment.Unspecified
TagForChildDirectedTreatment.Unspecified AgeRestrictedTreatment.Unspecified
未指派任何值 AgeRestrictedTreatment.Unspecified
沒有對應項目 AgeRestrictedTreatment.Teen

TFUA

TFUA 年齡處理方式
TagForUnderAgeOfConsent.True AgeRestrictedTreatment.Child
TagForUnderAgeOfConsent.False AgeRestrictedTreatment.Unspecified
TagForUnderAgeOfConsent.Unspecified AgeRestrictedTreatment.Unspecified
未指派任何值 AgeRestrictedTreatment.Unspecified
沒有對應項目 AgeRestrictedTreatment.Teen

瞭解年齡處理設定與 TFCD 和 TFUA 的互動

若同時設定年齡處理方式與 TFCD 或 TFUA,Google 將套用最嚴格的處理方式。

透過 AdMob 中介服務轉送年齡處理方式

如果您使用 Google Mobile Ads Unity Plugin 設定年齡處理方式,中介服務轉接程式會將年齡處理標記信號,轉送至整合的第三方廣告來源。

請參閱下表,瞭解哪些中介服務轉接程式版本,支援將年齡限制處理標記信號轉送至整合的第三方廣告來源:

中介服務轉接程式名稱 最低支援版本
AppLovin 8.7.4
BidMachine 1.4.2
Bigo 1.1.0
Chartboost 4.13.0
DTExchange (Fyber) 3.5.10
i-mobile 1.3.13
InMobi 5.3.0
IronSource 4.5.3
Liftoff Monetize (Vungle) 5.7.5
LY (Line) 2.1.1
maio 3.1.9
Meta (Facebook) 3.18.7
Mintegral 2.2.3
Moloco 3.8.0
MyTarget 3.39.0
Pangle 7.0.0
PubMatic 2.1.3

兒童導向內容設定

根據兒童網路隱私保護法 (COPPA),系統提供「兒童導向內容標記」設定。

應用程式開發人員可利用這個設定,在送出廣告請求時,指明 Google 可否將自家應用程式的內容視為兒童導向。如果希望 Google 將內容視為兒童導向,Google Mobile Ads Unity Plugin 就會採取相關行動,對廣告請求停用「按照興趣顯示廣告」(IBA) 功能和再行銷廣告。這項設定可透過 RequestConfiguration.TagForChildDirectedTreatment 搭配所有版本的 Google Play 服務 SDK 使用:

  • 使用 TagForChildDirectedTreatment.True 引數,在 RequestConfiguration 上呼叫 TagForChildDirectedTreatment,指明要根據 COPPA 將內容視為兒童導向。
  • 使用 TagForChildDirectedTreatment.False 引數,在 RequestConfiguration 上呼叫 TagForChildDirectedTreatment,指明不要根據 COPPA 將內容視為兒童導向。
  • 如果不想在廣告請求中指明是否依 COPPA 規定處理內容,請勿呼叫 TagForChildDirectedTreatment。

以下示範如何指明依照 COPPA 將內容標為兒童導向。

RequestConfiguration requestConfiguration = new RequestConfiguration
{
    TagForChildDirectedTreatment = TagForChildDirectedTreatment.True
};
MobileAds.SetRequestConfiguration(requestConfiguration);

針對未滿規定年齡的歐洲經濟區使用者,您可以在廣告請求中加上相關處理標記。這項功能是為協助發布商遵守《一般資料保護規則》(GDPR)。根據 GDPR 規定,您可能還有其他法律義務。建議參考歐盟官方指引,並諮詢您的法律顧問。Google 提供適用工具是為協助發布商遵守規定,而非方便發布商規避法定義務。

進一步瞭解 GDPR 對發布商的影響。

使用這項功能時,廣告請求會包含歐洲使用者適用的未滿規定年齡標記 (TFUA) 參數。這個參數會針對特定廣告請求,停用個人化廣告功能 (包括再行銷),並停止向第三方廣告供應商 (例如廣告評估像素和第三方廣告伺服器) 提出其他請求。

這項設定適用於透過 RequestConfiguration.TagForUnderAgeOfConsent 使用的所有版本 Google Play 服務 SDK:

  • 使用 TagForUnderAgeOfConsent.True 引數,在 RequestConfiguration 上呼叫 TagForUnderAgeOfConsent,指明您希望以適合未滿規定年齡使用者的方式處理請求設定。
  • 使用 TagForUnderAgeOfConsent.False 引數,在 RequestConfiguration 上呼叫 TagForUnderAgeOfConsent,指明您不希望以適合未滿規定年齡使用者的方式處理請求設定。

以下範例說明如何在廣告請求中加入 TFUA:

RequestConfiguration requestConfiguration = new RequestConfiguration
{
    TagForUnderAgeOfConsent = TagForUnderAgeOfConsent.True
};
MobileAds.SetRequestConfiguration(requestConfiguration);

用來啟用兒童導向設定的標記和 TagForUnderAgeOfConsent 不應同時設為 true,否則將優先採用兒童導向內容設定。

廣告內容篩選

這項設定可透過 RequestConfiguration.Builder.SetMaxAdContentRating() 搭配所有版本 Google Play 服務 SDK:

應用程式可在 RequestConfiguration 上使用 MaxAdContentRating,為請求設定設定廣告內容分級上限。系統為這些請求傳回的 AdMob 廣告,就不會超過指定的內容分級上限。這項聯播網額外資訊可能的值取決於數位內容標籤分類,且應為下列 MaxAdContentRating 物件之一:

  • MaxAdContentRating.G
  • MaxAdContentRating.PG
  • MaxAdContentRating.T
  • MaxAdContentRating.MA

下列程式碼會設定 RequestConfiguration 物件,指定傳回的廣告內容所對應的數位內容標籤分級不得高於 G:

RequestConfiguration requestConfiguration = new RequestConfiguration
{
    MaxAdContentRating = MaxAdContentRating.G
};
MobileAds.SetRequestConfiguration(requestConfiguration);

廣告請求

AdRequest 物件會收集指定目標資訊,並與廣告請求一併傳送。

新增聯播網額外資訊

聯播網額外資訊是隨廣告請求傳送的附加詳細資料,只適用於特定廣告來源。

以下程式碼片段是將額外資訊參數鍵 collapsible 設為 bottom 值,並傳送給 Google:

var adRequest = new AdRequest();
adRequest.Extras.Add("collapsible", "bottom");