BanhmiDev / admob_consent

This is a wrapper for Google's User Messaging Platform (UMP) SDK in Flutter
https://pub.dev/packages/admob_consent
Apache License 2.0
12 stars 11 forks source link

Feature Request: Get and Return Consent Type #3

Open SoftWyer opened 3 years ago

SoftWyer commented 3 years ago

There is a check in the Google API to get the Consent Type via getConsentType()

It would be good to expose getConsentType() as a general method in the plugin so we can determine whether to show non-personalised ads or not.

Futhermore, in onConsentFormDismissedListener the listener returns a message via the onConsentFormObtained method channel.

It currently always returns a null argument, but it could return what the Consent Type was.

BanhmiDev commented 3 years ago

Yeah, I got some time tomorrow for a commit. Refactoring the listener stuff seems like a good idea.

BanhmiDev commented 3 years ago

I did some research on getConsentType(), as it somehow only returns UNKNOWN when implemented, and found this thread: https://www.reddit.com/r/adops/comments/ifh6n9/anybody_using_google_funding_choices_for_gdpr_cmp

To address your concern, this behavior is expected - window.googlefc.getConsentStatus() ​will always return window.googlefc.ConsentStatusEnum.UNKNOWN if you're using the IAB TCF v2 framework. This status is only applicable if you're using the simplified Google GDPR consent framework. We are in the process of updating the developers' docs to clear up this point.

To my knowledge the UMP SDK should already handle whether to show non/personalized ads? Really hoping for the Google Team to update their documentation.

SoftWyer commented 3 years ago

Appreciate you looking into this.

That Reddit comment was interesting yet strangely disappointing, but hey, it's Google ¯\_(ツ)_/¯

I've been using the Admob flutter plugin and noted that they have an option to specify 'non personalised ads' which I thought this feature might enable. Why did I want this? Well the Admob console shows the error below which made me think I needed to control the personalised vs non-personalised ads based on consent.

No consent for Purpose 1 for EEA countries and the UK.

BanhmiDev commented 3 years ago

Creating a thread on their forums at https://groups.google.com/g/google-admob-ads-sdk would be a good idea, but their communication, again, has been pretty sparse regarding the UMP SDK...