3

Recently I implemented consent dialog for users based on https://developers.google.com/admob/ump/android/quick-start

Today I received the next issue in my Admob account:

IAB TCF v2.0 errors detected. We've detected an issue on your IAB TC string on one or more of your sites or apps. These errors may affect your ability to serve ads to European users. A detailed report is available for you on the EU user consent page.

It

I pressed "GO TO EU USER CONSENT" button and this was shown:

enter image description here

Downloaded csv file, here's content:

iab_tcf_errors_12_3_2020.csv

Mobile App,Ad unit,Error,Error count,Last detected date
com.*.*,7579454036,1.2,140,12/2/2020
com.*.*,3141515571,1.2,140,12/1/2020

Error code 1.2 from https://support.google.com/adsense/answer/9999955:

enter image description here

Consent code in my app (userConsentSDKSetup is called in onCreate of launch activity):

 fun userConsentSDKSetup() {
    val params = ConsentRequestParameters.Builder().build()
    val information = UserMessagingPlatform.getConsentInformation(activity)
    information.requestConsentInfoUpdate(
        activity,
        params,
        {
            // The consent information state was updated.
            // You are now ready to check if a form is available.
            if (information.isConsentFormAvailable && information.consentStatus == ConsentInformation.ConsentStatus.REQUIRED) {
                activity.lifecycleScope.launchWhenStarted {
                    loadUserConsentForm(information)
                }
            }
        },
        { Timber.e("userConsentSDK error ${it.message}") }
    )
}

private fun loadUserConsentForm(information: ConsentInformation) {
    UserMessagingPlatform.loadConsentForm(
        activity,
        { consentForm ->
            if (information.consentStatus == ConsentInformation.ConsentStatus.REQUIRED) {
                activity.lifecycleScope.launchWhenStarted {
                    consentForm.show(activity) { // Handle dismissal by reloading form.
                        loadUserConsentForm(information)
                    }
                }
            }
        }
    ) { Timber.e("userConsentSDK error loadForm ${it.message}") }
}

So what is wrong here? How can I solve this issue?

user924
  • 8,146
  • 7
  • 57
  • 139
  • Also have this error in AdMob. According to docs, we shouldn't manually modify ad request or smth else to notify about user consent status, so, unfortunately, I think we only can wait for UMP library updates. I've temporary disabled personalized ads, but still have this error in console after few days – j2esu Dec 22 '20 at 18:00
  • Temporary solution: https://stackoverflow.com/a/65560468/1241170 – j2esu Jan 04 '21 at 09:44

0 Answers0