New Requirements from Google to show ads - CMP

I’m experiencing the same problem.
How to track the event of a user closing a consent form?
It is has no any log output.
According to docs event.phase == "hidden’’ fired on banner.hide() call only
(also as the “refreshed”, but it has the “ump” type tho)

UPD: For now made forced ads loading by 30 sec timer together with the consent window showed.
Not sure if this is the best way.

2 Likes

Any news on this?

1 Like

What sort of news are you looking for?

It was implemented months ago and it works.

1 Like

I am confused as well what event.phase and event.type is returned when the user responding to the consent form being closed by making their decision on GDPR ?
Thanks

1 Like

As well as the previous question is the ATT stuff needed for a simple Admob implementation or is that now overridden by the GDPR stuff ? Thanks

1 Like

To the best of my knowledge, no event is returned- the window just closes. Then, next time you call admob.getConsentFormStatus(), consentStatus should return "obtained", and you know not to show the Consent Form again.

As for ATT- that is an Apple-specific requirement and is unrelated to GDPR. You will still need to get ATT permission in iOS.

1 Like

Thanks Colin, I implement ATT and Admob initially and the app was rejected because they wanted to see GDPR compliance before the ATT compliance request hence the request for the callback from showing GDPR. This whole process is getting very unwieldy and very tedious. The world is going mad … Everyone needs to move to paid apps and bin this free stuff I think … a price of a cup of coffee for an app doesn’t seem unreasonable !! oh well winge over … back to fighting Apple :slight_smile:

3 Likes

Hey @agramonte Could you please confirm if this code is totally efficient for managing the Consent Form and to start playing ads in your app?

I can test it again in the next few days and let you know.

1 Like

Great! … Thank you agramonte.

1 Like

I just tested it. I have tested one of my apps connected to France. I saw the consent. I said yes. I then closed the app and restarted it did not bring up the consent form.

3 Likes

I see … Thank you @agramonte

Ouch - this has been a right rigmarole with a liberal sprinkling of buffoonery and tomfoolery thrown in! :crazy_face:

One of those days where little was needed to do on my AdMob console and little in the way of code.

And yet … how to make ATT and CMP play nicely?

My ATT appears before the CMP popup. It seems from online posts that Apple will reject at review if a user does not allow ATT tracking and then the app follows the ATT popup with the CMP popup.

My question is how to get the CMP to appear before the ATT popup?

Perhaps I need to ditch NSUserTrackingUsageDescription in build settings and load the ATT using code (AFTER the CMP has been dismissed)? But how to do it?

Be glad to learn if you are calling ATT using code (rather than NSUserTrackingUsageDescription) in order to show CMP before ATT popups… :thinking:

Help!

I have just downloaded some Solar2D apps and can see that GDPR popup can be made to appear before the ATT popup. It seems that this is what I need in order to pass Apple Review.

At the moment my ATT appears before GDPR. Apple review certainly don’t wan’t ATT to appear - then the user selects “not to track” - followed by a GDPR popup.

I can’t update my app until someone kindly shows me how to get GDPR to appear before ATT.

Please help - I’m desperate. :cry:

build.setting:

["plugin.att"] = {
     publisherId = "com.solar2d"
},
NSUserTrackingUsageDescription = "<My ATT message>",

Admob listener:

if event.phase == "init" then
    print("********************************")
    print("Loading AdMob Rewarded")
    print("Loading AdMob Interstitial")
    print("Loading AdMob Banner")
    print("********************************")
    
    admob.load("rewardedVideo", {adUnitId = adMobRewardedID}) 
    admob.load("interstitial", {adUnitId = adMobInterstitialID})
    admob.load("banner", {adUnitId = adMobBannerID})
    
    admob.updateConsentForm({underage = false})
end
    
if event.phase == "refreshed" and event.type == "ump" then
    local formStatus, consentStatus = admob.getConsentFormStatus()
    print("formStatus: " .. tostring( formStatus ) .. ", consentStatus: " .. tostring(consentStatus))

    if formStatus == "available" and consentStatus == "required" then
        admob.loadConsentForm()
    end
end
  
if event.phase == "loaded" and event.type == "ump" then
    admob.showConsentForm()
end

I know there’s a way to avoid having ATT show up right away- I think it has to do with holding off on initializing the ads, but then you’re in a bit of a Catch-22 since you can’t show AdMob’s GDPR without initializing AdMob.

What I do is show ATT right away- probably not a best practice in terms of first-run experience for the player- but I don’t show the GDPR prompt until significantly later; after the player has played for a while and I’m closer to wanting to show an ad. I imagine the Apple reviewers have seen the GDPR popup, but they’ve never said anything about it. Perhaps the issue they’re having with how you’re doing it is that the player is hit with two nearly-identical popups back-to-back.

1 Like

Hi Colin - thanks a lot for posting. I figured out a suboptimal solution that I’ve posted below. Vlad posted back in 2021 about consent: Future of ad plugins - #5 by agramonte

All plugins updated after September I put ATT in them. You don’t need ATT plugin for most of the plugins anymore, since it is built in and would ask consent when network.init() is called.

It seems to me that admob.init() where I show the GDPR popup is ‘stomping’ on the ATT popup. I can delay the call to admob.init() and use att.request() but I really don’t want to display ATT before GDPR as there’s a fair few posts on various forums about Apple rejecting.

Here’s how I show GDPR after ATT. It needs refinement. Pitty that I can’t detect when GDPR closes - eek!

if event.phase == "init" then
    print("********************************")
    print("Loading AdMob Rewarded")
    print("Loading AdMob Interstitial")
    print("Loading AdMob Banner")
    print("********************************")
    
    admob.load("rewardedVideo", {adUnitId = adMobRewardedID}) 
    admob.load("interstitial", {adUnitId = adMobInterstitialID})
    admob.load("banner", {adUnitId = adMobBannerID})
    
    admob.updateConsentForm({underage = false})
end
  
if event.phase == "refreshed" and event.type == "ump" then
    local formStatus, consentStatus = admob.getConsentFormStatus()
    print("formStatus: " .. tostring(formStatus) .. ", consentStatus: " .. tostring(consentStatus))

    if formStatus == "available" and consentStatus == "required" then
        admob.loadConsentForm()
    end
end
  
if event.phase == "loaded" and event.type == "ump" then
    admob.showConsentForm()
    
    local function ShowATTPrompt()
        local formStatus, consentStatus = admob.getConsentFormStatus()
        
        if att.status == "notDetermined" and consentStatus == "obtained" then
            att.request()
        end
    end
    timer.performWithDelay(2000, ShowATTPrompt, 10)
end
  
if event.phase == "hidden" and event.type == "ump" then
    -- This event does not fire in response to GDPR closure.
end

I’ll need to experiment with the timer. It’s a crude solution to getting ATT to show after GDPR! :crazy_face:

An app I downloaded recently requested permission for notifications, followed by GDPR followed by ATT followed by a custom fancy modal about the app itself. What a mess websites and apps are with all this clutter (cluster fook!).

Still, iOS settings allow blanket disabling of some popups. Feeling weary with the hurdles and obstacles that is app development. Might be worthwhile if there was some money in it! LOL!

Another reason to show GDPR then ATT in quick succession is that my GDPR is configured to show a choice between consent and manage options. I’m kinda relying and hoping/expecting that many (some?) users will just choose consent on the GDPR rather than faff with the settings (as I often do online). Then when the ATT prompt appears soon after the GDPR, perhaps the user’s mindset will be one of ‘I’ve just consented to one popup, may as well do the same on the second one’? :thinking: