New Requirements from Google to show ads - CMP

Sorry for ignorance, but that ID is the one that must be entered into the parameter “testDeviceIdentifiers”? and how to get it?

admob.updateConsentForm({ underage= true , debug={ geography = "EEA" , testDeviceIdentifiers={ "Your-Device-Hash" } } })

Has anyone managed to display the consent form in their app.

I have it showing from both my iOS app and my android app, So far the consent rate is not bad.

Date Operating system EEA & UK traffic rate GDPR consent rate
2023-11-04 iOS 13.07% 100.00%
2023-11-04 Android 3.23% 100.00%
2023-11-03 iOS 8.65% 66.67%
2023-11-03 Android 0.00% 0.00%
2023-11-02 iOS 9.31% 80.00%
2023-11-02 Android 0.00% 0.00%
2023-11-01 iOS 12.68% 100.00%
2023-11-01 Android 3.13% 0.00%
2023-10-31 iOS 6.33% 0.00%
2023-10-31 Android 1.64% 0.00%
2023-10-30 iOS 9.84% 100.00%
2023-10-30 Android 17.65% 100.00%
2023-10-29 iOS 6.49% 80.00%
2023-10-29 Android 0.00% 0.00%
2023-10-28 iOS 8.78% 80.00%
2023-10-28 Android 0.00% 100.00%
2023-10-27 iOS 8.79% 100.00%
2023-10-26 iOS 11.96% 100.00%
2023-10-25 iOS 9.30% 50.00%
2023-10-24 iOS 6.71% 80.00%
2023-10-24 Android 0.00% 0.00%
2023-10-23 iOS 9.94% 100.00%
2023-10-22 iOS 9.64% 87.50%
2023-10-22 Android 33.33% 100.00%
1 Like

Regarding the device hash, you need to check the logs once you call updateConsentForm

Another option is to use VPN

1 Like

Yeah, I’ve managed to implement it in several games. The docs seem to still be in their rough, original form, which doesn’t include all necessary details.

To get the consent form to appear, you need to:

  1. Set up the consent management message for your apps over at your AdMob profile.
  2. Require the plugin via local admob = require( "plugin.admob" ) (make sure you’ve set it up in your build.settings as well).
  3. Initialize the plugin, via init.
  4. Upon successly init, you need to first updateConsentForm.
  5. Then, after a delay, you can getConsentFormStatus.

You can set up the delay in various ways. You could, for instance, fire a timer in the ad listener’s “init” phase after updating the consent form, or you could initialise the plugin when the app starts and get the form status before trying to show your first ad.

I’ll go update the docs to a proper form later this week. I have a few other Solar2D (and non-Solar2D) tasks that I need to sort out first.

3 Likes

What could be the minimum delay for getConsentFormStatus?

I have a feeling it’s most likely a matter of a couple of frames, but you shouldn’t try calling it in any tight loops.

In the projects where I’ve set it up, the delay is either in the hundreds of milliseconds or before ads would be shown, which can take quite a while, but then the consent form also doesn’t bother the user unless the play long enough to get ads.

1 Like

In my setup I keep retrying with increasing delays until there’s a result other than “unknown”, just like if you were trying to load an ad

At what point after updateconsent and getconsentstatus do you load the consent form and actually show it? Would be great if someone that has this working to get a sample code/app of the full thing working all together.

Also maybe a question for @Scott_Harrison does the ump make the hasUserConsent Param on the admob.load function redundant, and ignored based on the values passed through the ump. Or is this something we need to explicitly set based on returned values from the ump response?

1 Like

After checking yours messages i can finally get the dialog, checking consent status in init phase and also using underage false works. But in other mobile frameworks we can asynchronous wait for a dialog to be closed and next line we can see what’s chosen, in Solar2d how will i know dialog is shown and closed so i can check the consent status again ?

Also is it okay that consent status isn’t switching to “required” from “obtained” even though i choose “do not consent”, i see there is a reset consent function in native android for test but we don’t have it here.

Edit: As i understand we don’t know what user chose, status will be “obtained” if its chosen yes or no and i will send admob.load request anyways but then admob will let me show ads or not according to user’s yes or no.

You have to read shared preferences to check the consent, see my code above. Google isn’t providing an easy way for this, even in native, I think.
The reset function isn’t available in solar right now, you could pressure Scott for that. Only option is to clear app data or reinstall

1 Like

But what do you use consent result for ? Afaik it isn’t only related to personalisation and admob sdk handles itself.

Can someone whose consent display works share a sample code/application where it works so you can see where and how best to call it. Is it possible to call display concordance in the same place as we call ads.

local function adListener( event )

 if event.phase == "init" then

	admob.updateConsentForm({underage = false})

	timer.performWithDelay(6000, function()

	    local formStatus, consentStatus = admob.getConsentFormStatus()

		if consentStatus == "required" and formStatus == "available" then

			admob.loadConsentForm()

		end

	end, 1)

 end

 if event.phase == "loaded" and event.type == "ump" then

	admob.showConsentForm()

 end

end

Today i uploaded it to store like this, showed the dialog to 140 ppl as I saw on the dashboard and got 35% approval :confused:

While testing I used {underage = false, debug = {geography = “EEA”, testDeviceIdentifiers = {“Paste Your Test Hash From Logcat”}}} for updateConsentForm options.

1 Like

I don’t allow them to say no. They say no, they are not able to play the game because I don’t display ads.

According to Ironsource:

Privacy Directive
The ePrivacy Directive, as implemented by EU member states, generally requires consent to be obtained for the purpose of storing, accessing, or transmitting information from an end user’s device. The vast majority of ad networks, including ironSource’s ad network, rely on accessing certain device data in order to perform their basic functionalities. Accordingly, you must make sure that you properly obtain the end user consent for accessing and transmitting its device data prior to initializing any third party SDK, including LevelPlay, and ironSource ad network. If a consent is not obtained, you should not initialize the ironSource SDK.

Did you configure “Do not consent” button in the first layer or “Close (do not consent)” on? Be aware that Google cuts all ads without consent

Where in the code you initiate the AdMob plugin
admob.init( adListener, { appId=“ca-app-pub-xxxxxxxxxxxxxxxxxxxxxxxx~xxxxxxxxxxxxxxxxxx” } )

in the above code you don’t see this

I init it in app launch as same code line in your message (testMode = true while testing too).

uhmm I think you meant to reply @agramonte but I also wonder if it’s legal to disable both “do not consent” and “close” buttons, my consent rate is low when these are on, people fastly click “do not consent” and revenues will be impacted. User can still manage consent in manage options button if i disable them ofc.

I have researched this extensively, but as a company, you are not required under any law to give services for Free.

Some quotes from other forums:

While the GDPR protections can’t be waived, as the answers state, it’s reasonable for a company to disallow anyone from using their software if the user doesn’t give their consent to a required use of their data (as long as the data use and request are legal).

As far as the freely given clause of GDPR:

I think you have a skewed view of what freely given means. The company doesn’t owe you service. If they were legally mandated to provide you service, then there might be an argument that consent wasn’t freely given. The company clearly establishing that they won’t begin giving service unless you give consent to their use of your data is part of a typical contractual relationship. The GDPR doesn’t give you a right to force them to provide service to you…