Terms and Privacy Policy Flow
The SDK ships a built-in consent flow based on Google UMP. You choose how it runs with EmpowerAdsConfig.PrivacyMode when you initialize the SDK.
| Mode | Behavior |
|---|---|
PrivacyMode.Manual | Default. The SDK starts without a consent flow. You run the flow yourself with RequestConsent. |
PrivacyMode.Automatic | The SDK runs the consent flow for you, then starts. |
PrivacyMode.NonPersonalized | Applied on iOS only. On Android the SDK starts at once, as with Manual. |
The default is PrivacyMode.Manual. With the default, no consent form is shown unless you call RequestConsent.
Requesting Consent
Set PrivacyMode.Automatic and initialize the SDK. No other call is needed.
var config = new EmpowerAdsConfig(
android: "YOUR_ANDROID_APP_AD_IDENTIFIER",
iOS: "YOUR_IOS_APP_AD_IDENTIFIER")
{
PrivacyMode = PrivacyMode.Automatic
};
EmpowerAds.Initialize(config);
Requesting Consent Yourself (Optional)
To control when the flow runs, keep PrivacyMode.Manual, call RequestConsent at launch and initialize the SDK from its callback:
EmpowerAds.RequestConsent(completed =>
{
EmpowerAds.Initialize(new EmpowerAdsConfig(
android: "YOUR_ANDROID_APP_AD_IDENTIFIER",
iOS: "YOUR_IOS_APP_AD_IDENTIFIER"));
});
The callback tells you whether the flow finished, not what the user chose.
On iOS RequestConsent opens the privacy options form instead. Use PrivacyMode.Automatic on iOS.
Letting Users Change Consent (Optional)
GDPR requires an entry point where users can revisit their consent choices. IsPrivacyOptionsRequired tells you whether that applies to the current user (call it after the consent flow), and ShowPrivacyOptionsForm opens the form. A common placement is an item in your settings screen.
if (EmpowerAds.IsPrivacyOptionsRequired())
{
privacyOptionsButton.SetActive(true);
}
// When the user taps the button:
EmpowerAds.ShowPrivacyOptionsForm();