Skip to content

Consent & Privacy

Before showing ads, Google requires developers to obtain user consent for data processing and personalized ad display.
This is handled through the User Messaging Platform (UMP) — an official SDK provided by Google that automatically manages consent forms and stores the user’s preferences.

Personalized ads typically generate significantly higher revenue, as they use relevant targeting data.
However, to enable them, your app must comply with GDPR (General Data Protection Regulation) and COPPA (Children’s Online Privacy Protection Act).

The plugin fully integrates Google’s UMP SDK, which displays the consent dialog configured in your AdMob account and correctly forwards consent status to all mediation partners.
If consent is not granted, only non-personalized ads or limited ad requests will be available.


To use the User Messaging Platform (UMP), you must first create a consent form in your AdMob account.
This form will be automatically fetched and displayed by the plugin when you request user consent.

  1. Go to your Google AdMob dashboard.
  2. Open the section Privacy & Messaging.
  3. Under Consent management solutions, click Create for both European regulations (GDPR) and US state regulations.
  4. Once created, AdMob will handle displaying these messages to users automatically through the UMP SDK.

This function displays the User Messaging Platform (UMP) consent dialog that asks the user for permission to show personalized ads and process personal data in accordance with GDPR and COPPA.

It is recommended to call this function before the game starts — for example, in the loading screen or main menu — so that consent is collected before any ads are loaded.
If the user has already provided consent, the dialog will not be shown again, and the process will complete instantly.

Parameters

An optional parameter that marks the user as being under the age of consent.
If enabled, the consent dialog will not appear, and personalized ads will be disabled automatically.
Use this setting only in specific cases — for example, if your app includes its own age verification system.


2. On Completed

Called when the consent process has finished successfully.
You can safely start loading and showing ads from this point.


3. On Failure

Called if the consent form fails to load or display.
This callback returns an EFormErrorCode value describing the reason for failure.
Use it to log the error and take appropriate action — for example, retry showing the form or return to the main menu.


This function displays the User Messaging Platform (UMP) consent dialog even if the user has already given consent.
It’s typically used in a Settings or Privacy menu where players can manually review or change their consent preferences.

Unlike the standard Request Consent Form, this function always forces the consent window to appear, regardless of previous choices.

Parameters

1. On Completed

Called when the consent form has been displayed and completed successfully.
You can continue with loading ads or update UI elements if needed.


3. On Failure

Called if the consent form fails to load or display.
This callback returns an EFormErrorCode value describing the reason for failure.
Use it to log the error and take appropriate action — for example, retry showing the form or return to the main menu.


This function checks whether the user has already provided consent for personalized ads.
It’s useful when you want to confirm consent status before attempting to load or show ads.

If the result is true, the user has granted consent and personalized ads can be displayed.
If false, only non-personalized or limited ads should be shown until consent is obtained.

Parameters

1. Return Value

A boolean value indicating whether user consent has been given.
- true — the user has accepted personalized ads
- false — the user has declined or not yet provided consent


This function resets the stored consent information for the user.
It clears the saved consent status so that the User Messaging Platform (UMP) dialog can be shown again on the next request.

This is useful for testing or when you want to provide players with an option to review or change their consent settings manually.

Parameters

This function does not have any input or output parameters.
It simply resets all stored consent preferences.


Configure Ad Mob Privacy

This is an optional configuration function that controls AdMob’s privacy and data processing behavior.
Use it with caution — incorrect values may disable personalized ads and significantly reduce ad revenue.

This node is designed for apps that specifically target children or handle sensitive age-related content.
If your app is not intended for children, you generally should not use this function.

Parameters

1. Is Child Directed

Marks the app as directed toward children under the COPPA (Children’s Online Privacy Protection Act) regulation.
When enabled, AdMob restricts ad targeting, disables personalized ads, and ensures only age-appropriate content is shown.
Use this only if your app is clearly intended for a child audience.


Disables personalized ads for users who are considered under the age of consent according to GDPR or regional regulations.
This does not block ad requests but forces all ads to be non-personalized.
Unlike the same option in Request Consent Form, this parameter does not skip the consent dialog — it simply controls how ads are served afterward.


C++ Usage

All consent and privacy functions are also available in C++.
You can manage user consent, reset state, or adjust privacy flags directly through static methods of UAdMobCPPLibrary.

RequestConsentForm

#include "AdMobCPPLibrary.h"

void UMyClass::RequestConsent()
{
    FOnConsentFormCompletedNative OnCompleted;
    OnCompleted.BindLambda([](EConsentStatus Status)
    {
        UE_LOG(LogTemp, Log, TEXT("Consent form completed."));
    });

    FOnConsentFormFailedNative OnFailure;
    OnFailure.BindLambda([](EFormErrorCode Code, const FString& Message)
    {
        UE_LOG(LogTemp, Error, TEXT("Consent form failed."));
    });

    const bool bUnderAgeOfConsent = false;
    UAdMobCPPLibrary::RequestConsentForm(bUnderAgeOfConsent, OnCompleted, OnFailure);
}

ForceConsentForm

#include "AdMobCPPLibrary.h"

void UMyClass::ForceConsent()
{
    FOnConsentFormCompletedNative OnCompleted;
    OnCompleted.BindLambda([](EConsentStatus Status)
    {
        UE_LOG(LogTemp, Log, TEXT("Consent updated."));
    });

    FOnConsentFormFailedNative OnFailure;
    OnFailure.BindLambda([](EFormErrorCode Code, const FString& Message)
    {
        UE_LOG(LogTemp, Error, TEXT("Failed to show forced consent form.);
    });

    UAdMobCPPLibrary::ForceConsentForm(OnCompleted, OnFailure);
}

IsConsentGiven

#include "AdMobCPPLibrary.h"

void UMyGameInstance::CheckConsent()
{
    bool bHasConsent = UAdMobCPPLibrary::IsConsentGiven();

    UE_LOG(LogTemp, Log, TEXT("Is consent given? %s"),
        bHasConsent ? TEXT("Yes") : TEXT("No"));
}

ResetConsentState

#include "AdMobCPPLibrary.h"

void UMyGameInstance::ResetConsent()
{
    UAdMobCPPLibrary::ResetConsentState();
}

ConfigureAdMobPrivacy

#include "AdMobCPPLibrary.h"

void UMyGameInstance::ConfigurePrivacy()
{
    const bool bIsChildDirected = false;
    const bool bIsUnderAgeOfConsent = false;

    UAdMobCPPLibrary::ConfigureAdMobPrivacy(bIsChildDirected, bIsUnderAgeOfConsent);
}