User Messaging Platform

User Messaging Platform (UMP) is a Google SDK that helps you manage user consent, particularly for privacy regulations like GDPR and CCPA. It handles the display of consent forms, collects user choices regarding personalized ads and data usage, and passes that information to advertising SDKs like AdMob. Your code uses the UMP SDK to request and respect the user's consent status without needing to build and manage your own complex consent flow.

Start by requesting the consent information update. It must be called in every app session before checking the user's consent status or loading a consent form. After calling this method, GetConsentStatus() and CanRequestAds() will be updated immediately to hold the consent state from the previous app session, if one exists. GetConsentStatus() and CanRequestAds() may be updated again immediately before the Info Updated pin is fired.

BlueprintsC++
// C++ code not available yet
Blueprints code to update UMP consent info

You can simulate being in the EEA or not using the DebugGeography option of the Parameters. Also specify your test device ID there.

Load and Show the Form

You can now load a consent form and immediately present it using the following code. The form is only shown if ConsentStatus is Required. The Shown pin will be completed successfully after the user selects an option (and the form is dismissed), or if the form is not required. It will be completed with an error if the form fails to load or show. GetConsentStatus() and CanRequestAds() will be updated prior to the Shown pin being fired.

BlueprintsC++
// C++ code not available yet
Blueprints code to load and show the UMP consent form

More Control over the Form

You can also load and show the form separately, it can be useful to pre-load the form or to have consent logic better fit with your app's flow.

BlueprintsC++
// C++ code not available yet
Blueprints code to load and show the UMP consent form