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:
The following configuration can improve the probability of users consenting to GDPR:
Under "User options - Close (do not consent)", select Close.
The overall effect after adjustment is shown in the image below.

Finally, click "Publish" in the top right corner.
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:
In the AdMob console, under "Privacy & messaging", click "GDPR Settings" to open the GDPR settings.

Click the edit icon (
) under the "Review your ad partners" section.
Refer to the table below and check all ad networks integrated in your project.
| Google Name | TopOn SDK Network |
|---|---|
Meta |
|
| AppLovin Corp | AppLovin |
| ironSource Mobile | IronSource |
| InMobi Choice | InMobi |
| BIGOAds | Bigo |
| Chartboost | Chartboost |
UnityAds |
Unity Ads |
| Ogury Ltd | Ogury |
AdColony |
AdColony |
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.
Click "Confirm".
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". 


- 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 afterapplicationDidBecomeActive.- The code below applies to globally distributed apps.
// 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
}
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.
- (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;
}
[[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.
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.
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.
[[NSUserDefaults standardUserDefaults] removeObjectForKey:@"IABTCF_TCString"];
[[NSUserDefaults standardUserDefaults] removeObjectForKey:@"IABTCF_PurposeConsents"];
[[NSUserDefaults standardUserDefaults] removeObjectForKey:@"IABTCF_AddtlConsent"];
[[NSUserDefaults standardUserDefaults] removeObjectForKey:@"IABTCF_VendorConsents"];