setTagForUnderAgeOfConsent static method

Future<void> setTagForUnderAgeOfConsent(
  1. bool underAge
)

You can mark your ad requests to receive treatment for users in the European Economic Area (EEA) under the age of consent. This feature is designed to help facilitate compliance with the General Data Protection Regulation (GDPR). Note that you may have other legal obligations under GDPR. Please review the European Union’s guidance and consult with your own legal counsel. Please remember that Google's tools are designed to facilitate compliance and do not relieve any particular publisher of its obligations under the law. Learn more about how the GDPR affects publishers.

When using this feature, a Tag For Users under the Age of Consent in Europe (TFUA) parameter will be included in the ad request. This parameter disables personalized advertising, including remarketing, for all ad requests. It also disables requests to third-party ad vendors, such as ad measurement pixels and third-party ad servers.

Learn more

Both setChildDirected and setTagForUnderAgeOfConsent should not be true at the same time. If they are, the child-directed setting takes precedence.

true = TAG_FOR_UNDER_AGE_OF_CONSENT_TRUE
false = TAG_FOR_UNDER_AGE_OF_CONSENT_FALSE
null = TAG_FOR_UNDER_AGE_OF_CONSENT_UNSPECIFIED

Implementation

static Future<void> setTagForUnderAgeOfConsent(bool underAge) async {
  await _pluginChannel.invokeMethod('setTagForUnderAgeOfConsent', {
    'under': underAge,
  });
}