Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to deal with the (soon) required UMP (consent) requirements by Google Admob? #601

Open
1n3JgKl9pQ6cUMrW opened this issue Jul 24, 2023 · 38 comments

Comments

@1n3JgKl9pQ6cUMrW
Copy link
Contributor

Like everyone using Admob (on Android) I get mails and messages (from Google) like this;

Later this year, Google will require all publishers serving ads to EEA and UK users to use a Google-certified Consent Management Platform (CMP). You can use any Google-certified CMP for this purpose, including Google's own consent management solution. If you are interested in using Google's consent management solution, start by setting up your GDPR message and implementing the UMP SDK.

image

At the moment I am not using any consent solution, since I am targeting some lower numbered Android-API's, but before the end of this year I have to implement this solution or ad serving will stop (I guess).


How to solve this situation?

Google does offer a walk-through for creating a message and like, but at the end you have to implement their UMP (User Messeging Platform) SDK to get the consent for ad-serving to the end-user.

image


How did you solve / manage this?

Is it enough to complete the form in the second screenshot and implement Ratsons "consent plug-in";

https://admob-plus.github.io/docs/cordova/consent

Or did you use a more native (?) plug-in like this;

https://github.com/jellomaster/cordova-plugin-google-ump


We all have to implement the UMP SDK before the end of this year, so I think it's important to have the solution clear for everyone.

@MrRotella
Copy link

Hi,
in the European area where gdpr applies it is important to verify consent before posting any ad.
Follow this link https://admob-plus.github.io/docs/cordova/consent where is explained how to check the consent and there is the link for message generation (not use the alpha version of the plugin yet, install it with "cordova plugin add cordova-plugin-consent@2.4.0 --save --variable UMP_VERSION=2.0.0").
In combination you can use this plugin to check the choices (personalizazed or not ads) https://github.com/MrRotella/cordova-plugin-gdpr-choices and then initialize the ads.

@1n3JgKl9pQ6cUMrW
Copy link
Contributor Author

Thank you for responding!

Indeed, my target audience is (also) based in the EU, so I have to deal with it.

I see you are also the creator of a GDPR-plugin for Cordova, thanks for that.


Hopefully you can answer those two questions;

  1. Are those three plugins (in the end) the same?
  1. Is it enough to use only Ratson's version? (and not implement the one from MrRotella or JellowMaster)

Or do you need at least two plugins from the list mentioned above?

It seems they are all "integrations" for the Google User Messaging Platform (UMP) SDK, and the consent page of Ratson is not mentioning any additional (needed) plugins.

So maybe it's enough to install just Ratson's implementation and skip the others?

@MrRotella
Copy link

MrRotella commented Jul 25, 2023 via email

@1n3JgKl9pQ6cUMrW
Copy link
Contributor Author

1n3JgKl9pQ6cUMrW commented Jul 25, 2023

Yes, your response is very helpful, also for others I think.

So let's forget the JellowMaster plugin, it's old anyway.


What I understand from your point of view is this;

  1. Users of Admob Plus are required to use Ratson's consent plugin, so the app can display the GDPR message to the end-user (and offer them a choice).
  2. In addition - but not required? - is the MrRotella plugin, which can doublecheck for the GDPR choice the end-user has made.

I think the second one is not required, because Ratson's consent plugin can not only show the GDPR message, but also check for the users preference afterwards.

See the documentation at https://admob-plus.github.io/docs/cordova/consent#forward-consent ;

If a user has consented to receive only non-personalized ads, pass npa="1" when creating the ad.

From what I understand is that Ratson's plugin can show the message and check for the value / preference as well.

This is from the same page as mentioned before;

trackingAuthorizationStatus:
0 = notDetermined
1 = restricted
2 = denied
3 = authorized


But it's not 100% clear from the documentation what his plugin can (and can't) do.

@pw-repo
Copy link

pw-repo commented Aug 9, 2023

Is there any update about this question? It is really unclear, how to check before creating an ad, do I need to pass npa=1 or not.

@1n3JgKl9pQ6cUMrW
Copy link
Contributor Author

1n3JgKl9pQ6cUMrW commented Aug 9, 2023

I am still struggling with it myself.

I did investigate the code (for Android) of this plugin and also of a similar plugin, made by our friend @EMI-INDO

This is the alternative AdMob plugin from him;

https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob

And this is the attached consent plugin;

https://github.com/EMI-INDO/emi-indo-cordova-plugin-consent

But since I use AdMob Plus / the Community Edition, I want to use the consent plugin for this plugin as wel.

From my understanding - but that is what I understand, I can be wrong - this is how it works;

  1. A user of your app must "agree" with the type of ads (personalized, or not) and this "preference" is saved in the Google Consent Management Platform (CMP).
  2. In order to show the form / message (with the consent for the ads) one must "speak" to the Googles User Messaging Platform (UMP).
  3. Once a user has set his / her preference for the ads in your app, this is saved remotely on the AdMob server.

The last point (3) is important, because when this is the case, you don't have to send any parameter when requesting an ad.

Google / Admob know "knows" that User-X (automatically set by the user-Ad-Id) which uses App-Y (set by the app-id, like foo.bar.com) wants to see personalized ads, or not - and will return the requested type of ad.

This makes sense, because otherwise the developer can simply ignore this preference and fake the request by sending personalized ads, even when the user doesn't want to (and Google can only see this is happening, when they know the preference of the user... and since they need to know the preference of the user, they can sent back the required ad type themself, making fooling harder).

I hope I have time next week to setup a test-app (the backend for this is already set in the CMP environment).

And once I know more, I will share it here and write also down a simple guide of "how I did implement it".

From January 15th 2024 ad-serving will stop when you use AdMob without user-consent (for new and / or updated apps), so this is a really important thing to fix before.

@markenapps
Copy link

markenapps commented Aug 10, 2023

Hi and thanks for this plugin.

I believe that this plugin is not sufficient to clarify whether and how ads may be displayed.
Because no matter if the user selects "consent" or "do not consent", the ConsentStatus is Obtained in both cases.
In addition, according to the Google Doc, canRequestAds must be called before advertising can be displayed (https://developers.google.com/admob/ios/privacy?hl=en#request-ads).

That's why you need https://github.com/MrRotella/cordova-plugin-gdpr-choices in my opinion.
Problem: This plugin is android only and it does not call/support canRequestAds directly. But it reflects whether the user has selected "consent" or "do not consent" via the function canShowAds.

I also think that the function canShowPersonalizedAds (of the plugin cordova-plugin-gdpr-choices) is not needed, because google PRESUMABLY automatically takes this into account when delivering ads. At least I didn't find anything about it in the docs. It might be helpful if you only use google consent management but get the ads from another provider.

And last but not least I think that npa='1' has to be passed in case of ios if trackingAuthorizationStatus() !== 3 (authorized).

If someone can confirm or disprove this or has a solution for ios that would be great!

@1n3JgKl9pQ6cUMrW
Copy link
Contributor Author

1n3JgKl9pQ6cUMrW commented Aug 10, 2023

Hi and thanks for this plugin.
(...)
If someone can confirm or disprove this or has a solution for ios that would be great!

Yup, it's very unclear how (and if) the plugins do work.

The NPA parameter does seem to do something in the plugin of Ratson (it's hardcoded in both JS and JAVA sourcefiles).

But "the best solution" is not clear to me, I will try to figure out some things next week.

Also it's unclear how Google "knows" that we are implementing the consent in the way they want us to do.

Of course I do show the consent-form, but "what happens after that" is out of my hands.

BTW - this is a nice, informative read, explaining things (not unique for Cordova).

https://itnext.io/android-admob-consent-with-ump-personalized-or-non-personalized-ads-in-eea-3592e192ec90

@cumul0nimbus
Copy link

It seems that the new SDK efficiently manages the majority of the ad-serving process independently. By employing the latest SDK, there should be no requirement to explicitly define personalized or non-personalized ads. Please review the release notes of latest ump sdk version (2.1.0)

https://developers.google.com/interactive-media-ads/ump/android/release-notes

@markenapps
Copy link

markenapps commented Aug 27, 2023

This is what I have found out so far.

load and show consent form only if consentStatus==REQUIRED in the current sdk there is a explicit function for this. But you can also check it manually.

You should request an update of the user's consent information at every app launch. When consentStatus==REQUIRED you have to show the form again. But: "Consent obtained in the previous session can be used to request ads.". So you do not have to wait for requestInfoUpdate to complete to start showing ads.

The same applies to canRequestAds.
You can also check for consentStatus==OBTAINED || consentStatus==NOT_REQUIRED.

do not consent means non personalized ads only.
This is autonomously ensured by Google. This was interesting to me because I thought this means do not show ads.

npa=1 is for publishers who want to request non-personalized ads regardless of whether or not the user is in the EEA. This means we do not need to set it.

I think the only way to handle GDPR and ATT correctly is to implement both via UMP SDK. Ump sdk includes fuctions to request consent for personalized ads as well as to handle Apple's App Tracking Transparency requirements. This means You can configure an IDFA Explainer Message in AdMob. However, there is currently an issue in the process that needs to be fixed by Google. Google is still working on it and will report on the status..

Just as a side note:
delay app measurement android
delay app measurement ios

@1n3JgKl9pQ6cUMrW
Copy link
Contributor Author

1n3JgKl9pQ6cUMrW commented Sep 1, 2023

DISCLAIMER : I develop for Android only, the code-samples also show "extra" code, not 100% needed for this plugin.


As promised I should implement the consent plugin into my apps and report my findings here.

It took me some time, because I had also update those apps first to Android 13 / API 33.

This has nothing to do with the consent, but that's why I did not respond immediately.

Installation

I did install the stable release of Ratsons consent-plugin (not the bèta version).

cordova plugin add cordova-plugin-consent@2.4.0 --save --variable UMP_VERSION=2.0.0

Less revenue

In short; the need for consent is gonna hurt us all and will decrease our ad-income, since it's very simple to disable all ads just by two clicks.

This has nothing to do with the plugin, but is "by design" and a big issue for years.

  1. A user does not confirm the consent and selects "more options";
  2. The user now selects "confirm my choices";
  3. No ads will be served ever.

This is caused by the fact that in step 2 no choices are set by default, so the user confirms "nothing", resulting in a "no fill / no config" error on the client-side of Admob.

Sending the optional parameter NPA=1 (non personal ads) doesn't do anything, because even when selecting "some" options in the 2nd screen is not enough for "non personal ads"'.

Even Google self says the "NPA" parameter is a test and can become useless in the future.

I expect at least a drop of 50% ad revenue;

  1. Not everyone will update the app, and older apps without consent will stop showing ads;
  2. Not everyone can update the apps (my target is 33, min-version 24 / but I also have app-versions of 21 / 22 / 23 wondering around and those will stop showing ads);
  3. Not everyone will consent at once and fiddle around with the screen, resulting in no ads at all.

More about this issue;

  1. https://groups.google.com/g/google-admob-ads-sdk/c/InmLIbFm8Xg
  2. https://groups.google.com/g/google-admob-ads-sdk/c/UcveWmtBm4Q/m/QOezaayMAwAJ
  3. https://snigel.com/blog/how-to-serve-ads-without-user-consent

The plugin

Ratsons plugin is fine and works as intended (I did use the production version, not the bèta one).

A bug?

After setting up the backend in Google UMP and activating the plugin, I got immediate result but there was an error at first.

image

In the provided example at this page...

https://admob-plus.github.io/docs/cordova/consent#usage

...one should show the form when consent.ConsentStatus.Required (which equals to 1).

But at first start of the app, the status is not required but unknown. which equals to 0. So I did not get any consent-form at my three hardware-test-devices and my Android emulators.

Only after setting "status is required OR unknown" the form popped up.

At a fresh start, the status is 0 and becomes only 1 when the form is already there, the app is closed and re-activated again before giving consent.

Another bug?

Also, when you exit the app (with giving consent) by the back button of your device, the form is shown again the next start.

So it will keep nagging you when a user says "okay", closes the app by the "back button" and restarts the app - the form is there again.

When you say "okay" and close the app from the "open apps screen", by swiping it away - the form is not shown the next time you open the app.

I fixed this by binding the back-button to a plugin that "hard closes" the app.

https://github.com/huangang/cordova-plugin-app-exit

image

The plugin hooks the existing navigator.app.exitApp(); function and kills tombstone status.

When you "swipe away" to close the app, it's okay now and when you "back button" to close it, with this plugin the form will not show again.

Another workaround

Instead of "hooking" the backbutton, there's another workaround.

image

In the original code, the form is shown when available, even when consent is already obtained.

The backbutton-hook kills this situation, but you can also skip the plugin and explicitly ask for a consent-for when it is available but the consent is not equal to obtained.

There is no use to show the form, when the consent is already there. This way the form doesn't popup every time a user exits the app by the 'back button'.

GDPR

Ratsons plugin is write only, it can not (or hardly) read the preferences set by the user.

It can "see" if consent is needed, but you can not check for any set preferences after all.

This is not a big issue, but I needed more info because of the revenue drop when users do not consent.

In order to read the consent status afterwards, I did use another plugin;

https://github.com/MrRotella/cordova-plugin-gdpr-choices

This plugin does not show the form (which Ratson does), but you can get all values.

image

It is not registered with NPM, and you can't install it by .git as provided in the readme.md (got a $PATH server error).

So I did download the .zip with source-code, unzipped it and used this command;

cordova plugin add ../../my-gdpr-plugin-folder/ --variable PREF_VERSION=1.2.0

I now have this setup;

  1. User does consent; ads are shown
  2. User does not (completely) consent; ads are never shown

When situation 2 is active. I check for the preferences of the consent every x-days (not every day, that will drive my users crazy).

Then I check those values;

  1. Does GDPR apply (must be 1)
  2. Is consent obtained (must be 3)
  3. Can I show ads (must be 1)

image

When check 3 is not 1, this means GDPR is active, the user has seen the form but does not want any ads.

In that case I do a consent reset, using consent.reset(); and at the next app-start the form will be shown again.

This procedure will be repeated until the users says "stop nagging my, I do consent!"

It's not nice, but my apps are free to use and I do work about 60 to 80 hours a week to keep them running.

Payed models, subscription, premium options, etc... don't work (been there, done that) so I am stuck to the ads and with the new consent, Google does everything to kill the income.

There are some other CMP providers that do "enable" non-personal-ad-settings by default, but they work with monthly subscriptions for using this service and there is no Cordova plugin available.

Other thoughts

The coming weeks I will implement the solution in my apps, without activating them.

This will be done by a switch from the server, when everything is rolled out and flattened (workflow, onboarding, etc...).

What are you thoughts and how did you implement this required consent?

@bonjourjoel
Copy link

The NPA parameter does seem to do something in the plugin of Ratson (it's hardcoded in both JS and JAVA sourcefiles).

Hi @1n3JgKl9pQ6cUMrW . Are you sure about this? i found this for example:

putString("npa", npa)

How do you know it's hardcoded?

@1n3JgKl9pQ6cUMrW
Copy link
Contributor Author

1n3JgKl9pQ6cUMrW commented Sep 2, 2023

The NPA parameter does seem to do something in the plugin of Ratson (it's hardcoded in both JS and JAVA sourcefiles).

Hi @1n3JgKl9pQ6cUMrW . Are you sure about this? i found this for example:

putString("npa", npa)

How do you know it's hardcoded?

Maybe I did make a typo?

The npa parameter if fetched and executed by the plugin.

But it doesn't do anything on AdMob's end, at least not during my (very) extensive testing.

When a user does not consent, you will simply never, ever serve any ad to that user.

So with just two clicks the consent-form does act as a solid ad-blocker, blocking all ad requests.

  1. Do not agree with consent, select "set preferences"
  2. Select "confirm preferences" (nothing is selected at default)
  3. No single ad will ever be shown

Even when you opt-in for all preferences (at rootlevel) in the 2nd consent screen, you will get "no ad fill" and / or "config error" from AdMob's side.


But Google itself says npa is supported;

https://support.google.com/admanager/answer/7678538?hl=en

Tagless Request

If you're using Tagless Request, you can mark an ad request as non-personalized by adding the npa=[int] parameter directly to the tag request URL. We recommend you specify the parameter early in the tag to avoid any risk of truncation. Specify npa=1 to mark the ad request as non-personalized. Omission of the parameter defaults to personalized ads.

For example:

https://securepubads.g.doubleclick.net/gampad/ad?iu=/12345/adunit&sz=728x90&npa=1&c=12345

If anyone has success with the npa parameter, please let us know.

@bonjourjoel
Copy link

bonjourjoel commented Sep 2, 2023

Tagless means we didn't even show the consent form, and then if we send the request with npa=1 they claim to fill with a non personalized ad? But they don't in your testing? Did I understand correctly?

Because here in the table they claim that without the consent form, they will not accept npa=1 requests after a 3 months adjustment period. Again if I understand correctly...
https://support.google.com/admob/answer/9760862?hl=en&sjid=1250070971414374767-EU

And what if the user is in usa, the consent form is automatically hidden? Do you know?

Thanks for the informations.

@1n3JgKl9pQ6cUMrW
Copy link
Contributor Author

1n3JgKl9pQ6cUMrW commented Sep 2, 2023

I did not succeed in requesting AND seeing a single Non Personal Ad in all my testing.

Even when sending npa:1 as a default with the test-requests (done through the plugin).

In line with our (Google) existing EU User Consent policy, consent for cookies or mobile identifiers is required for both personalized and non-personalized ads.
For non-personalized ads, consent for cookies or mobile identifiers is still required because non-personalized ads still use cookies or mobile identifiers to combat fraud and abuse, for frequency capping, and for aggregated ad reporting.

This is what Google says ( via : https://snigel.com/blog/how-to-serve-ads-without-user-consent ) of the situation.


So you even need some cookies to set an NPA-ad, and since a user can reject all cookies with 2 clicks, the cookies are not set and ads are never shown.

But again; this is what I did find out with my testing.


In Googles UMP (User Messaging Platform) you can set the geolocation for the CMP (Consent Management Platform) to "always show" or "only for EU (and some British...)".

image


But I am not an expert and just hard working to get everything in place before the end of this year.

When 50% of the users does not consent with ALL settings at once, you will simply loose 50% of your income (since all ads will be blocked).

@bonjourjoel
Copy link

Very useful info thx. For your concern, i'm pretty sure google will fix this the problem you found in your testing and fill the npa requests if everything is in order.

@1n3JgKl9pQ6cUMrW
Copy link
Contributor Author

1n3JgKl9pQ6cUMrW commented Sep 2, 2023

Very useful info thx. For your concern, I'm pretty sure google will fix this the problem you found in your testing and fill the NPA requests if everything is in order.

The will not fix it.

Or at least that is what I read in the fora, people are complaining about this since day 1 (2020).

Google simply says "we can't show NPA-ads through Admob, so we won't show ads".


image

Source 1 : https://groups.google.com/g/google-admob-ads-sdk/c/InmLIbFm8Xg
Source 2 : https://groups.google.com/g/google-admob-ads-sdk/c/UcveWmtBm4Q/m/QOezaayMAwAJ


And the issue is known in this thread : #544

"Case closed" as blocking ads is "by design".


There are 3rd party CMP's (Consent Management Platform) that do support NPA-settings for users (in the form), but this plugin only supports the one of Google itself.

There "should" be a setting in the form where a user can opt-in for NPA-ads, but that's almost impossible to realize.

You must exactly know which toggles you turn on / off, dive deep in the settings, etc... no body will do that.

So it's simple;

  1. User grants access : ads are shown
  2. User says "no" : Admob is killed

I guess we are all gonna loose a huge amount of money in the next year - so let's help each other out here and share our findings.

@bonjourjoel
Copy link

Alright i hear you. 👍

Maybe they're acting like this out of pettyness against Bruxels, but more likely the gdpr strictness is nullifying some of their anti-click-fraud arsenal.

Now since they are making this mainstream, if they lose a lot of money over it, they may improve their current system and fill those ads. Or not...

In last resort, since you said you have many apps, you could backfill with house ads.

@1n3JgKl9pQ6cUMrW
Copy link
Contributor Author

1n3JgKl9pQ6cUMrW commented Sep 3, 2023

For those who are interested.

  1. You are not allowed to force the user to agree, e.g. by closing the app when consent is not given or restricting functionality; the will to agree must be voluntary and without punishments.
  2. You must give the user an option to change the consent afterwards, by a setting in the menu of your app - so one can also decide to "not consent" or "consent" contrary to an earlier decision.

More about it in this thread; https://groups.google.com/g/google-admob-ads-sdk/c/9U7UY4mx858/m/YLb0pxEIBAAJ

If you do otherwise, your app will not apply to the strict GDPR rules in Europe.

@SiempreProgramadorNovato

@1n3JgKl9pQ6cUMrW Thanks for all your contribution in this valuable thread.

I was not aware of the importance of having this requirement ready by January 2024. I will reproduce from my end the steps you have posted and also try to find some solution, and if I do, I will, of course, comment here.

I am like you, trying to upgrade my applications to api 33 first and I hope it won't be a nightmare to do so.

@1n3JgKl9pQ6cUMrW
Copy link
Contributor Author

1n3JgKl9pQ6cUMrW commented Sep 8, 2023

@1n3JgKl9pQ6cUMrW Thanks for all your contribution in this valuable thread.

I was not aware of the importance of having this requirement ready by January 2024. I will reproduce from my end the steps you have posted and also try to find some solution, and if I do, I will, of course, comment here.

I am like you, trying to upgrade my applications to api 33 first and I hope it won't be a nightmare to do so.

For the EU (plus Great Britain) the GDPR rules will apply in 2024.

So when your Admob implementation does not deal with the "consent requirement" all ad-serving will stop from that date.

I think a lot of folks out there - who don't know about this requirement - will be in panic from 2024, January...


Updating to API 33 was quite simple in my case, although I had to update Cordova (v11) and Gradle (v9) as well to get a "native" support for this new API level (which is required since September 2023).

Only thing I had to change was my splashscreens (all apps now have the native API 33 splashscreen icon, which is made backwards compatible by the Cordova team, deprecating the old splashscreen plugin).

And for Android 13 devices I now have to explicitly ask for permission to show notifications (toasts on top of the screen), because at default those are set "off".

Notifications in Android 13 / API 33 are opt-in now (used to be opt-out).


As for the consent;

The plugin of Ratson does work perfect in a Cordova environment.

But it is write-only; so an and-user can "write / set" his / her preferences and that's it.

That's enough for Google (from what I understand), but as an app-developer I also want to "read / get" those preferences at userlevel.

So that's where the extra plugin from MrRotella (mentioned in this thread) comes in handy (it's Android only, but that's okay for me).

With this plugin you can see if GDPR does apply (e.g. in Europa, and not in Africa for example).

And if the users wants to see personal ads, non-personal ads or no ads at all.

When a users selects "set my preferences" in the content screen and than hits "okay" without doing anything, no single ad is served; the GDPR rule acts as a solid ad blocker than...

That's why I created a workflow like this;

  1. User accepts ads... that's fine, no action needed
  2. User does not accept ads (personal or non-personal, doesn't matter)... a follow up will be required.

So when the second situation is active, I will "nag" the user every 3, 5 or 7 days (which is a preference set on the server where the app communicates with) to show the consent form again.

This can be forced by consent.reset(); so the user can / must set the preferences again and again... until ads are accepted.

It's unclear if this is allowed (you are not allowed to force the user the accept the ads by closing the app, or make it cripple, e.g.), but I will try once it's 2024.

Also I created a dedicated "reset preferences" button which wil reset the GDPR preferences by hand (triggered by the user), which is a requirement by GDPR (an user must "own" the preferences and be able to (re-)set them anytime).

So, I do understand the need of GDPR (from a consumer point of view) but without ads my apps will die (which is why I need them to be served).

@SiempreProgramadorNovato

Thank you for your quick and detailed response. I appreciate it very much, as I am not an experienced developer, and with your explanation, and by sharing your implementation of the GDPR rules, you have put me in the right direction, on a topic I had no idea about, let alone where to start an implementation from. I really appreciate it.

I will definitely apply that same workflow you have pointed out, as soon as I finish updating my applications to api 33. The workflow is convenient and of course, those of us who depend on ads to make our applications profitable, must create some non-invasive option to insist on ads acceptance and your strategy of asking recurrently with a space between days, is the most user friendly option, which I also see at the moment.

I thank you also for the information about notifications in api 33 and splashscreens, I was not fully aware of it. So is it necessary to ask the user for permissions to send and receive notifications on devices under android 13? for my part I use the cordova-plugin-firebasex plugin. Would it be enough to place a modal in which the user is asked permission to receive notifications and if they accept to subscribe to the topic or something like that?

Also due to your experience doing these updates and thanking you in advance for your help I wanted to ask you if you had been able to solve in your updates any of these warnings, which appear in the google play panel when I try to load an update:

  1. The crawler detected a blank loading screen or a custom splash screen that is shown in your app after the system splash screen. Users launching your app on Android 12 or higher will see 2 splash screens.

To solve that I just put the tag to see if the warning dissapear, I was not able to achieve the icon of my app to apper on the splashscreen so I will use only a background color to see if it works.

  1. Apps targeting Android 13 or above and use advertising ID must include the com.google.android.gms.permission.AD_ID permission in the manifest.

To solve that I will update the admob plus plugin as Im using 1.0.28 version an also thanks to you I knew the sunset admob sdk versions issue, but due to some external works I was not able to update the version still.

Appreciate again all your valuable help even more so when google and admob are getting more demanding and strict every day in terms of policies and requirements. I think these are difficult times for all of us developers who depend on ads to make our projects profitable, but Im sure we will make it through.

@1n3JgKl9pQ6cUMrW
Copy link
Contributor Author

Quick answers, but we are going off-topic here (it becomes a mega-thread, which is fine for me).


NOTIFICATONS

See https://github.com/dpa99c/cordova-plugin-firebasex#grantpermission

I also use this plugin and from Android 13 / API 33 notifications are turned off by default (in order to not nag the users, which I think is okay).

In the readme.md linked above, all is written down how to implement the notification permission (no need to create a modal yourself, since Android does this for you).

FirebasePlugin.grantPermission(function(hasPermission){
  console.log("Notifications permission was " + (hasPermission ? "granted" : "denied"));
});

This code will ask for permission once (even when executed more times).

And place this in config.xml for Android;

<config-file target="AndroidManifest.xml" parent="/*">
   <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
</config-file>

When a user changes something (afterwards) to the notification settings (e.g. turning it off again by hand) the same code will aks again if notifications are allowed.

Just fiddle around; deny notifications, approve them, reset, restart, uninstall, retry, etc... it works automatically.

Android 12 and lower also execute this code, but will pass the "old" preference to the system, so they will never see this popup and still receive notifications.


SPLASH

Remove all old (deprecated) Cordova code for the splashscreen (in my case when building from the commandline (I don't use Android Studio), I got warnings about this "double splashscreen code error thing".

So uninstall the splashscreen plugin, remove all settings from config.xml.

In my case, this is the new code for the splasscreen in that file;

  <preference name="AndroidWindowSplashScreenAnimatedIcon" value="res/icons/splashscreen.png" />
  <preference name="AndroidWindowSplashScreenBackground" value="#eeeeee" />
  <preference name="AndroidWindowSplashScreenIconBackgroundColor" value="#377d3e" />
  <preference name="AutoHideSplashScreen" value="true" />
  <preference name="FadeSplashScreen" value="true"/>
  <preference name="FadeSplashScreenDuration" value="750"/>
  <!-- preference name="SplashScreenDelay" value="5000" / -->

Didn't use the last one (for now) so I disabled it.

You can create a "vector drawable" icon which is cool, but more complex : so for the time being I use a transparant high-res icon (.png).

Keep in mind that all Android version do crop the icon in there own way (rounded, semi-rounded, square), etc...

So add space / marging / padding around it.

https://developer.android.com/develop/ui/views/launch/splash-screen#splash_screen_dimensions

image

Google prefers an image like above, I created something like below;

image

800 x 800 pixels and the "white area" is always visible (the darker area can / will be cropped) - this works for all Android versions (13 and lower).

But there is a bug in Android 12 where a non-default launcher will not show the icon... it's not you, that's Android.


AD-ID

You have to declare the "AD ID" for Android 13 (when using ads).

Do this by placing this in config.xml under the Android section;

<edit-config file="AndroidManifest.xml" mode="merge" target="/manifest/uses-permission" xmlns:android="http://schemas.android.com/apk/res/android">
  <uses-permission android:name="com.google.android.gms.permission.AD_ID"/>
</edit-config>

In my case the permission was already asked without using this code; the AD_ID is also "mis-used" by other plugins / Android-codes because it was used as a anonymous identifier (before GUID was a thing).

But I did place it in the config anyhow, just to be sure...


APPROVAL

When updating to Android 13 / API 33 Google must approve that the app is fully supporting the platform.

This takes days and even when approved, the warning that your app is not "okay" is still there... but that's a bug (feature...) at Googles end; all fora are complaining about it.

I uploaded about 3 versions of the same app, because I was still getting the "error". But after doing nothing and waiting for about two / three days the warning disappeared and now all my apps are approved an live in the store.

@SiempreProgramadorNovato

Thanks again for your reply, and for the detailed and organized information, which is pure gold for me at this time of upgrading to api 33, more being my applications my main source of income. Thanks a lot.

At this moment I managed to test the solutions for the issue with the splashscreen, I uninstalled the splashscreen plugin as you did, I also deleted all the tags from the config.xml as you said and replaced them with the ones you posted, upload an internal test on the play console, tested it, and it worked perfectly. Many thanks for that, I tried several solutions without success, but your procedure solved the problem.

And as for the rest of the solutions ,I have fully understood them and will implement them all. I really appreciate the valuable details you have provided me, in that, not only are they going to simplify the upgrade of my apps to the android 33 api, but I will already know from your previous experience, what to expect from the google play store team review on the console.

Sorry for the off topics and the mega thread, even when you helped me in such a kindly way.

Thanks and All the best

@1n3JgKl9pQ6cUMrW
Copy link
Contributor Author

You are welcome, hopefully others will find this thread when needed.

It took lots of research, but it looks like we are on the good route to both Android 33 and the GDPR-thingy with our apps.

@hooliapps
Copy link

Hello, i have the same problem, if no consent then no ads even "not customised", i have maybe one solution, if "no ad loaded" i display html link+banner with no cookies, but i dont know if there is any Ads platform that i can use as a fallback solution ? Or another way ?

@1n3JgKl9pQ6cUMrW
Copy link
Contributor Author

1n3JgKl9pQ6cUMrW commented Sep 9, 2023

Hello, i have the same problem, if no consent then no ads even "not customised", i have maybe one solution, if "no ad loaded" i display html link+banner with no cookies, but i dont know if there is any Ads platform that i can use as a fallback solution ? Or another way ?

When user says "no", ads by Google are never served.

See;

  1. https://groups.google.com/g/google-admob-ads-sdk/c/InmLIbFm8Xg
  2. https://groups.google.com/g/google-admob-ads-sdk/c/UcveWmtBm4Q/m/QOezaayMAwAJ

The GDPR rules makes it impossible for Google to serve ads, even non-personalized when a user doesn't agree with all settings in the consent form.

More information https://snigel.com/blog/how-to-serve-ads-without-user-consent


This is a known "problem" for the plugin - #544

What you are looking for is called "mediation", but this plugin doesn't support that.

@EMI-INDO did create a "rewrite" of this plugin that supports it;

https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob

@pw-repo
Copy link

pw-repo commented Sep 21, 2023

Hello,

Spent some time investigating the question and would like to share it with you.

Found interesting person, who works in Ads company and like everyone investigate the issue too.

There are 2 his posts related to our topic as well:
https://www.linkedin.com/pulse/game-over-navigating-google-tcf-22-requirements-consent-bo%25C5%25BEo-jankovi%25C4%2587/
https://www.linkedin.com/pulse/google-require-tcf-consent-collection-what-means-bo%25C5%25BEo-jankovi%25C4%2587/

Also, I regularly check this google group, for the topic around CMP, TFC

From my investigation, seems that using Google UMP framework is not the best in terms of UX, where users can easily click DON'T CONSENT, as their UI is not well configurable and doesn't have A/B testing of the CMP modal.

Currently, I will wait some time to gather more information and near the 2024 year, I am sure, there will be more information from different sources.

The most important question for now is:
- will Google fully stop serving ads from 16 January 2024 if CMP is not configured in existing apps, or only new and updated apps without CMP won't be approved, but the existing app(which are released before 2024) will work?

@1n3JgKl9pQ6cUMrW
Copy link
Contributor Author

1n3JgKl9pQ6cUMrW commented Sep 21, 2023

Hello,

Spent some time investigating the question and would like to share it with you.

Found interesting person, who works in Ads company and like everyone investigate the issue too.

There are 2 his posts related to our topic as well: https://www.linkedin.com/pulse/game-over-navigating-google-tcf-22-requirements-consent-bo%25C5%25BEo-jankovi%25C4%2587/ https://www.linkedin.com/pulse/google-require-tcf-consent-collection-what-means-bo%25C5%25BEo-jankovi%25C4%2587/

Also, I regularly check this google group, for the topic around CMP, TFC

From my investigation, seems that using Google UMP framework is not the best in terms of UX, where users can easily click DON'T CONSENT, as their UI is not well configurable and doesn't have A/B testing of the CMP modal.

Currently, I will wait some time to gather more information and near the 2024 year, I am sure, there will be more information from different sources.

The most important question for now is: - will Google fully stop serving ads from 16 January 2024 if CMP is not configured in existing apps, or only new and updated apps without CMP won't be approved, but the existing app(which are released before 2024) will work?

The User Messaging Platform (UMP) for the Consent Management Platform (CMP) by Google is a disaster, GUI wise.

It almost uses a dark pattern to deny consent; just click "manage options" and "confirm" and the whole consent idea works as a solid ad blocker.

Also primary and secondary buttons are swapped both by color and position.

But the thing is that Googles CMP is the only one with a bridge for Cordova, so we are stuck to it (until someome releases a plugin for a third party, Google approved CMP).

Also I THINK all ad-serving is stopped after 2023, both for old, new and updated apps, when consent is not given.

It's simply against the European rule and it's gonna cost is tons of money (and billions for Google).

But it's unclear, for sure - so better be prepared.

@pw-repo
Copy link

pw-repo commented Sep 21, 2023

Has anyone tested cordova-consent plugin with Apple IDFA and CMP together?

There are known issues when Apple rejected apps, that used CMP and IDFA together and didn't do it correclty.(for example, if user denied consent through CMP, then Apple requires not to show IDFA and use denied result from CMP)

Also, interesting to understand the following questions:

  1. Do we need to show IDFA or CMP first?
  2. For every app there is own terms of service and privacy policy - is it allowed to combine CMP and own privacy policy/terms into the same modal?

Currently in our app there is terms of service modal and IDFA(only Apple), if we add CMP there will potentially be 3 modals when the user starts the app? Who likes these modals? Nobody...

@1n3JgKl9pQ6cUMrW
Copy link
Contributor Author

I can't speak for Apple, since I only develop for Android.

But in Android you only see one modal, fired by the UMP as part of the CMP.

I have about six apps and decided to combine the privacy pages to a single one (I did this in the back end of Googles CMP setup).

This didn't trigger any errors, but I did not roll out the app updates in public yet.

The whole situation is nothing I wanted, but we have to.

I even don't harvest any private data (or regular data) as well, but my users still have to consent...

@pw-repo
Copy link

pw-repo commented Sep 21, 2023

My app requires consenting for own terms of service and privacy policy, that's why it seems that I can't combine it together as user can deny consent through CMP. Seems for me, it must be 3 different modals:

  1. CMP - consent for serving personalize ads, non-personalized app or limited apps(for me it is the same as no ads at all)
  2. IDFA - only for Apple
  3. Own modal with app's terms of service and privacy policy(without consenting user can't use the app)

The only question: what is the right order for all of these modals? and if this plugin can work correctly for both CMP and IDFA?

In a production app I use https://www.npmjs.com/package/cordova-plugin-idfa and it works, but I am thinking to use cordova-consent plugin for both CMP and IDFA

@1n3JgKl9pQ6cUMrW
Copy link
Contributor Author

1n3JgKl9pQ6cUMrW commented Sep 21, 2023

I am not sure if the mentioned IDFA plugin is valid for Google and the GDPR laws in Europe.

Even Googles states that you have to use their CMP or one approved by Google itself, so you can't use every one you like, unfortunately.

If a user consent is not forwarded to Admob, an ad will never be served.

So the CMP platform of your choise must have integration with Googles Admob backend.


I have those modals active right now;

  1. Welcome
  2. What's new
  3. GDPR
  4. Notification permission
  5. Rate the app

I created a workflow / onboarding process that guarantees a user will never see two modals at the same time / session, and never more than one a day.

So the first days I simply don't serve ads and permissions for notifications are not requested, for example.

@emi415064
Copy link

@1n3JgKl9pQ6cUMrW

https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob
Update emi-indo-cordova-plugin-admob@1.4.0
Update SDK (UMP) v2.1.0
Update SDK Ad v22.5.0
New SDK CMP v2.2

New features UMP v2.1.0

https://developers.google.com/admob/android/privacy?hl=id

Privacy options

  • Some consent forms require the user to modify their consent at any time.

New features TFC v2.2

https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework/tree/master

IAB Europe Transparency & Consent Framework

  • How to read consent choices

Example

https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob/blob/main/example/Advanced%20topics/consent_GDPR_IAB_TFCv2.2.html

If the user chooses not to display ads,
you can restrict access to the app, or ban it,
until they change their decision back,
Just call showPrivacyOptionsForm();

@AbdulRazak-Naeate
Copy link

AbdulRazak-Naeate commented Dec 10, 2023

@1n3JgKl9pQ6cUMrW

Installation

I did install the stable release of Ratsons consent-plugin (not the bèta version).

cordova plugin add cordova-plugin-consent@2.4.0 --save --variable UMP_VERSION=2.0.0

I am getting 'Failed to fetch plugin cordova-plugin-consent@2.4.0 via registry.' error when trying to install exact version you specified .But when I install the beta version , no form is shown , no log response nothing happens.

@pw-repo
Copy link

pw-repo commented Dec 14, 2023

Hello, one month left till we need to implement this requirement. Who can share their solutions of already working production apps?

Appreciate any information you got while implementing this feature using this plugin.

@emi415064
Copy link

@pw-repo

If there is no other solution, I recommend using this.
https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob.

@pw-repo
Copy link

pw-repo commented Dec 15, 2023

@emi415064 I don't need the full solution with admob, only need UMP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants