Menu

Google UMP Flow Guide

Background

Starting January 16, 2024, publishers and developers using Google AdSense, Ad Manager, or AdMob to serve ads to users in the European Economic Area or the United Kingdom must use a Consent Management Platform (CMP) that is certified by Google and integrated with IAB's Transparency and Consent Framework (TCF).

You can implement the UMP process through the APIs provided by TopOn. Please follow the steps below to complete the implementation:

1. Configure UMP

1.1 Enable UMP in the AdMob Console

  1. Visit the AdMob Console and log in to your AdMob account.
  2. Click "Privacy & messaging".
  3. Click "European regulations - Manage".
  4. Click "Create message" and wait for the GDPR message page to open.
  5. On the GDPR message page, click "Select apps" in the top right corner and select the app for which you want to display the GDPR message.
  6. Select the language in which you want to display the message.
  7. In the "Targeting" section, select the "Countries subject to GDPR (EEA and UK)" option.

The following configuration can improve the probability of users consenting to GDPR:

  1. Under "User options - Close (do not consent)", select Close.

    1. Style adjustment: Select the "Style" section
      • Under the button section, adjust the "Secondary color" to white (#ffffff).
      • Under the button section, adjust the "Secondary font color" to gray (#6e6e6e).
  2. The overall effect after adjustment is shown in the image below.

Finally, click "Publish" in the top right corner.

1.2 Self-Specified Ad Partners

By default, Google may not display all ad networks integrated in your project in your GDPR message. Failure to include these ad networks may adversely affect your ad revenue. Please follow the steps in this section to ensure that all ad networks integrated in your project appear in the GDPR message.

Customize which ad partners are displayed in the GDPR message:

  1. In the AdMob console, under "Privacy & messaging", click "GDPR Settings" to open the GDPR settings.

  2. Click the edit icon (✎) under the "Review your ad partners" section.

  3. Refer to the table below and check all ad networks integrated in your project.

    Google Name TopOn SDK Network
    Facebook Meta
    AppLovin Corp AppLovin
    ironSource Mobile IronSource
    InMobi Choice InMobi
    BIGOAds Bigo
    Chartboost Chartboost
    UnityAds Unity Ads
    Ogury Ltd Ogury
    AdColony AdColony
    Google AdMob
    StartApp Start.io【StartApp】
    Verve Group PubNative【Verve】
    Tapjoy Tapjoy
    Liftoff Vungle
    F@N communications Nend
    Fyber Fyber
    Kidoz Kidoz
    Mobvista/Mintegral Mintegral

    Remarks: For other ad networks not listed in this table, such as Pangle, Maio, MyTarget, Yandex, etc., since they are not in the AdMob GDPR ad partner list, TopOn will internally use the popup consent result to set the GDPR reporting level for these ad networks.

  4. Click "Confirm".

  5. Click the "Save" button at the bottom of the GDPR settings page.
    Note: If a popup asking "Re-consent all eligible users?" appears, select "Re-prompt".

1.3 Setting IDFA in the AdMob Console

1.4 Code Flow Instructions

1.5 Add Code (Please Complete the Above Flow Configuration First)

  • Presented using the present method; please do not present your own window at this time.
  • If the ViewController parameter is not passed, it will automatically be obtained and displayed by default.
  • Note: Please do not use it in - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions, because Apple requires the ATT request to be called after applicationDidBecomeActive.
  • The code below applies to globally distributed apps.
Copy
// Import header file
#import <AnyThinkSDK/ATAPI.h>
#import <AppTrackingTransparency/AppTrackingTransparency.h>

- (void)initFlow {
     
    [[ATAPI sharedInstance] showGDPRConsentDialogInViewController:[UIApplication sharedApplication].keyWindow.rootViewController dismissalCallback:^{
        // This example requests ATT permission when the user has consented. You can adjust it based on the actual app situation.
        if ([ATAPI sharedInstance].dataConsentSet == ATDataConsentSetPersonalized) {
            
            if (@available(iOS 14, *)) {
                [ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
                    
                }];
            }
        }
        
        // Initialize the SDK
        [[ATAPI sharedInstance] startWithAppID:kTopOnAppID appKey:kTopOnAppKey error:nil];
    }];
     
    //......Other code
}

1.6 Test Method

During the testing phase, you can simulate the UMP GDPR popup scenario in the EU region by using an EU region network proxy, or by using the following method.

  • The API requires a network request to Google for verification. Please ensure the relevant network environment requirements are met.
  • umpTestDeviceIdentifiers can be obtained by calling the showGDPRConsentDialogInViewController:dismissalCallback: method in the ATAPI singleton, and then searching for "UMPDebugSettings.testDeviceIdentifiers" in the console log.
  • Please remove the relevant test code before going live.
objc Copy
- (void)testUMPApply {
     /**
      * This test code needs to be removed before going live.
      * umpTestDeviceIdentifiers can be obtained by calling the showGDPRConsentDialogInViewController:dismissalCallback: method in the ATAPI singleton,
      * and then filtering for "UMPDebugSettings.testDeviceIdentifiers" in the console log.
    */
    [ATSDKGlobalSetting sharedManager].umpTestDeviceIdentifiers = @[@"Your Device Identifiers"];
    [ATSDKGlobalSetting sharedManager].umpGeography = ATUMPDebugGeographyEEA;
}
objc Copy
[[ATAPI sharedInstance] showSecondGDPRConsentDialogWithAppID:kTopOnAppID inViewController:self dismissalCallback:^{
        BOOL gdprConsent = [ATAPI sharedInstance].dataConsentSet == ATDataConsentSetNonpersonalized;
}];

Note: Withdrawing consent is the process by which users in the European Economic Area (EEA), the United Kingdom, and Switzerland can withdraw their consent after having consented to personalized ads. A corresponding link must be provided in the app's menu to allow users who wish to withdraw their consent to do so, and then the user consent message will be shown to them again.


2. FAQ

2.1 The project already has UMP SDK integrated. How to handle updating TopOn to version 6.2.87 or above?

Since the TopOn SDK will prioritize reading the GDPR-related settings configured by the UMP SDK during initialization to set the GDPR reporting level for third-party ad networks, developers need to ensure that the "Ad Partners" list in the AdMob console GDPR settings includes all ad networks integrated in your app (excluding Pangle, Maio, MyTarget, and Yandex platforms). Refer to Self-Specified Ad Partners above for configuration.
In addition, it is recommended to use the showGDPRConsentDialogInViewController:dismissalCallback: method in the ATAPI singleton to replace the original UMP SDK API call code. Refer to the sample code above and perform SDK initialization in dismissalCallback. If you wish to retain the original UMP SDK API call logic in the project, you need to refer to the example in the AdMob UMP Usage Guide, and initialize the TopOn SDK in the return of the loadAndPresentIfRequiredFromViewController:completionHandler: method of UMPConsentForm or after determining that UMPConsentInformation.sharedInstance.canRequestAds is YES.

2.2 The project already has UMP SDK integrated, but later the app update removed the UMP SDK usage. How to handle updating TopOn to version 6.2.87 or above?

Since the TopOn SDK will prioritize reading the GDPR-related settings set by the UMP SDK during initialization, even if the UMP SDK is removed, the old GDPR configuration cache files still remain locally. Developers need to call the following code to remove the cached data when removing the UMP SDK version. Sample code is as follows:
Note: After removing the UMP SDK GDPR local cache using this method, it may affect AdMob's ability to serve ads to users in the EEA or UK.

Copy
[[NSUserDefaults standardUserDefaults] removeObjectForKey:@"IABTCF_TCString"];
[[NSUserDefaults standardUserDefaults] removeObjectForKey:@"IABTCF_PurposeConsents"];
[[NSUserDefaults standardUserDefaults] removeObjectForKey:@"IABTCF_AddtlConsent"];
[[NSUserDefaults standardUserDefaults] removeObjectForKey:@"IABTCF_VendorConsents"];
Previous
Privacy Configuration Guide
Next
Testing Networks
Last modified: 2026-07-08Powered by