How to correctly set gdpr_consent with ConsentSDK?

299 views Asked by At

I have a warning from AdMob about TCF. After dealing with their support for a few weeks and sending them proxy logs, they say that I'm setting the npa parameter correctly but that I'm not setting a gdpr_consent parameter. But I don't see any way to set that up and they haven't given me any extra info as to how I would set it.

I am using MoPub for mediation and aside from ConsentSDK I'm also setting the npa value on MoPub.

This is my MoPub code:

Map<String,String> npa = new HashMap<>();
        npa.put("npa",disablePersonalizedAds ? "1" : "0");
        builder.withMediatedNetworkConfiguration(GooglePlayServicesAdapterConfiguration.class.getName(), npa);

And this is my ConsentSDK code:

ConsentInformation.getInstance(context).setConsentStatus(disablePersonalizedAds ? ConsentStatus.NON_PERSONALIZED : ConsentStatus.PERSONALIZED);

Does anyone know how to set that gdpr_consent value?

Thanks.

1

There are 1 answers

3
andzrev On BEST ANSWER

There are several things going on here.

First, which version of the AdMob adapters are you using in your app? As of v18.3.0.3 (Android) and v7.53.1.2 (iOS) of the AdMob adapters, MoPub collects GDPR consent on behalf of Google. What that means is, you do not need to manually pass in the npa in that manner. You can remove that line of code if you are on newer adapter versions.

Second, MoPub currently doesn't support TCF per https://developers.mopub.com/publishers/best-practices/gdpr-guide/. As such, when using MoPub for mediation and Google as a demand source, there are no changes for publishers aside from the existing GDPR requirements.