Background infomation
Starting January 16, 2024, publishers and developers using Google AdSense, Ad Manager, or AdMob that serve ads to users in the European Economic Area or the UK must use a Google-certified consent management platform (CMP) that is integrated with the IAB’s Transparency & Consent Framework (TCF).
You can implement the UMP process through the interface provided by TopOn . Please refer to the following steps for complete implementation:
1. Configure UMP
1.1 Enable UMP in Admob dashboard
- Visit Admob dashboard and log in to your Admob account
-Add your app in AdMob (if you haven't already done so) - Click on "Privacy and Messaging"
- Click on "European Regulations - Management"
- Click "Create Message" and wait for the GDPR message page to open
- On the GDPR message page, click "Select App" in the upper right corner and select the app you want to display GDPR information.
- Select the language you want messages to appear in
- In the "Targeting" section, select the "GDPR-compliant countries (EEA and UK)" option
The following configuration can increase the probability of users agreeing to GDPR
- "User Options - Close (disagree)" Select Close
- To adjust the style, select the "Style" column
- Adjust the "Secondary Color" under the button column to white (#ffffff)
- "Secondary font color" under the button column is adjusted to gray (#6e6e6e)
- To adjust the style, select the "Style" column
-
The overall effect after adjustment is as follows
Finally, click "Publish" in the upper right corner.
1.2 Self-designated advertising partners
By default, Google may not display all ad networks integrated in your project in your GDPR message. If you fail to include these ad networks, your ad revenue may be adversely affected. Follow the steps in this section to ensure that all ad networks integrated in your project appear in the GDPR message.
Customize which advertising partners appear in the GDPR message:
- In the Admob backend "Privacy and Messages" , click "GDPR Settings" to open the GDPR settings
- Click the Edit icon (
)
- Refer to the table below and check all the advertising platforms integrated in your project.
Note: Other advertising platforms not included in this table, such as Pangle, Maio, MyTarget, Yandex, etc., are not in the list of Admob GDPR advertising partners. TopOn will use pop-up consent results to set the GDPR reporting level of these advertising platforms.Google NameTopOn SDK NetworkFacebook 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
- Click "Confirm"
- Click the "Save" button at the bottom of the GDPR settings page
Note: If a pop-up window pops up asking "Re-ask opinions from all eligible users?", select "Re-prompt"
1.3 Admob dashboard settings IDFA
1.4 Code flow description
1.5 Add code (please complete the above process configuration first)
- Present mode, please do not present your window at this time
- If the ViewController parameter is not passed in, it will be automatically obtained and displayed by default.
- Kindly note, please do not
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
because Apple requires that
applicationDidBecomeActive
Then call ATT to apply.- The following code is for apps distributed globally.
#import <AnyThinkSDK/ATAPI.h>
#import <AppTrackingTransparency/AppTrackingTransparency.h>
- (void)initFlow {
[[ATAPI sharedInstance] showGDPRConsentDialogInViewController:[UIApplication sharedApplication].keyWindow.rootViewController dismissalCallback:^{
if (([ATAPI sharedInstance].dataConsentSet == ATDataConsentSetUnknown && ([[NSUserDefaults standardUserDefaults] boolForKey:@"GDPR_First_Flag"] == YES))
|| [ATAPI sharedInstance].dataConsentSet == ATDataConsentSetPersonalized) {
if (@available(iOS 14, *)) {
[ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
}];
}
}
[[ATAPI sharedInstance] startWithAppID:kTakuAppID appKey:kTakuAppKey error:nil];
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"GDPR_First_Flag"];
}];
//......Other Code
}
1.6 Test Method
During the testing phase, you can use an EU network proxy or use the following method to simulate the UMP GDPR pop-up scenario in the EU.
- The API requires network request for Google verification. Please meet the relevant network environment requirements.
- umpTestDeviceIdentifiers can be obtained by calling the showGDPRConsentDialogInViewController:dismissalCallback: method in the ATAPI singleton and then looking for "UMPDebugSettings.testDeviceIdentifiers" in the console log.
- Please remove the relevant test code before going online.
- (void)testUMPApply {
/**
* Before push app to AppStore Connect , you must remove these test code.
*/
[ATSDKGlobalSetting sharedManager].umpTestDeviceIdentifiers = @[@"Your Device Identifiers"];
[ATSDKGlobalSetting sharedManager].umpGeography = ATUMPDebugGeographyEEA;
}
1.7 Add a link in your app where users can withdraw their consent
Note: Withdrawal of consent is the process by which users in the European Economic Area (EEA), the United Kingdom, and Switzerland can withdraw their consent for personalized ads. It is required that a link be provided in the app's menu for users who wish to withdraw their consent, and then the user consent message be displayed to them again.
- For more information, see here .
- Refer to the Google AdMob Ads SDK developer documentation to implement privacy settings options.
2. Frequently Asked Questions
2.1 The UMP SDK has been integrated into the project. How to update TopOn to version 6.2.87 or above?
Since TopOnSDK will first read the GDPR-related settings set by UMP SDK to set the GDPR reporting level of third-party advertising platforms when it is initialized, developers need to ensure that the "Advertising Partner" list in the GDPR settings of the Admob background needs to include all advertising platforms integrated in your application (except Pangle, Maio, MyTarget, and Yandex platforms). For details, please refer to the above section specified advertising partners 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 to initialize the SDK in dismissalCallback . If you want to keep the original UMP SDK Api call logic in the project, you need to refer to the example in the Admob UMP User Guide and initialize the TopOn SDK in the return of the loadAndPresentIfRequiredFromViewController:completionHandler: method of UMPConsentForm or after judging that UMPConsentInformation.sharedInstance.canRequestAds is YES.
2.2 The UMP SDK has been integrated into the project, and the use of the UMP SDK was removed during the subsequent App update. How to update TopOn to version 6.2.87 or later?
Since TopOnSDK will first read the GDPR related settings set by UMP SDK when it is initialized, even if UMP SDK is removed, the old GDPR configuration cache file will still be retained locally. Developers need to call the following code to remove the cached data while removing the UMP SDK version. The sample code is as follows:
Note: This method may affect Admob's advertising to users in the European Economic Area or the United Kingdom after removing the UMP SDK GDPR local cache
[[NSUserDefaults standardUserDefaults] removeObjectForKey:@"IABTCF_TCString"];
[[NSUserDefaults standardUserDefaults] removeObjectForKey:@"IABTCF_PurposeConsents"];
[[NSUserDefaults standardUserDefaults] removeObjectForKey:@"IABTCF_AddtlConsent"];
[[NSUserDefaults standardUserDefaults] removeObjectForKey:@"IABTCF_VendorConsents"];