Following the Unity Messaging Platform docs to surface a popup asking users for consent, my code looks something like this:
void Start()
{
ConsentRequestParameters request = new ConsentRequestParameters
{
TagForUnderAgeOfConsent = false,
};
ConsentInformation.Update(request, OnConsentInfoUpdated);
}
void OnConsentInfoUpdated(FormError consentError)
{
ConsentForm.LoadAndShowConsentFormIfRequired((FormError formError) =>
{
if (ConsentInformation.CanRequestAds())
{
MobileAds.Initialize((InitializationStatus initstatus) =>
{
// TODO: Request an ad.
});
}
});
}
Even if a user selects "Reject All", ConsentInformation.CanRequestAds()
is true, and this Github comment by a Google Admob staff member leads me to believe that the UMP wrote a "TC String" which Google Admob abides by, meaning you don't have to do anything extra.
However, if we're using additional ad networks like IronSource or AppLovin, how can we pass that information on to them as well?
Other networks like Applovin will themselves often read the TC string (which is a general industry standard, not specific to Google) or AC string in some cases. But some networks may need you to explicitly pass data to them, it's unfortunately generally up to you to check documentation for each of the networks. It is also likely important that you complete the UMP consent flow before initializing ad networks.
From applovin's documentation
Applovin also has notes on how each of their mediated ad networks receive the consent status (i.e. the network reads it through TC, the network reads it through AC, applovin reads it and passes it to the network via the adapter, etc.)
Applovin mostly handles it all for you once your CMP (i.e. Google UMP) sets TC/AC strings. An exception (as noted in the above documentation) is that you still need to pass Data Processing Options for Meta. I'm not sure what IronSource requires, I would hope they similarly handle TC/AC and forward to their mediated networks where required.
The latest version of Applovin's Unity SDK (12.0.0) actually bundles Google UMP.