如要指出使用者是否未滿規定年齡,請設定 tagForUnderAgeOfConsent (TFUA)。如果將 TFUA 設為 true,UMP SDK 就不會向使用者徵求同意。如果應用程式的目標對象包含混合受眾,請為兒童使用者設定這項參數,確保系統不會要求他們提供同意聲明。您有責任在必要時設定這項參數,以遵守 COPPA 和其他相關法規。
以下範例說明如何在 UMP 同意聲明請求中,將 TFUA 設為 true:
/** * Sets tag for under age of consent on consent request parameters. */exportfunctionrequestConsentWithTagForUnderAgeOfConsent(){requestConsentInfoUpdate({tagForUnderAgeOfConsent:true,},(error)=>{if(error){console.warn('Consent info update error:',error.message);}},);}