Google UMP 使用指南
一、集成 UMP
通过CocoPods集成
pod 'GoogleUserMessagingPlatform'
根据UMP接入指南进行集成
示例代码
#import <TradPlusAds/TradPlusAds.h>
#import <UserMessagingPlatform/UserMessagingPlatform.h>
//通过UMP授权
__weak typeof(self) weakSelf = self;
[UMPConsentInformation.sharedInstance
requestConsentInfoUpdateWithParameters:nil
completionHandler:^(NSError *_Nullable requestConsentError) {
if (requestConsentError == nil) {
[UMPConsentForm loadAndPresentIfRequiredFromViewController:nil
completionHandler:^(NSError * _Nullable error) {
[weakSelf startTradPlusSDK];
}];
}
else
{
[weakSelf startTradPlusSDK];
}
}];
if(UMPConsentInformation.sharedInstance.canRequestAds)
{
[self startTradPlusSDK];
}
- (void)startTradPlusSDK {
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
//初始化
[TradPlus initSDK:@"TradPlus后台的应用对应appid" completionBlock:^(NSError *error){}];
//加载广告
});
}
二、在Admob后台开启UMP
1.访问Admob后台登录Admob账号,在 AdMob 中添加你的应用(如果您尚未添加应用)
2.点击“隐私权和消息”
3.点击“欧洲法规-管理”
4.点击“创建消息”,等待GDPR消息页面打开
5.在GDPR消息页面中点击右上角“选择应用”,选择您想要显示GDPR信息的应用
6.选择您想要显示消息的语言
7.在“定位”栏目中选择“须遵守 GDPR 的国家/地区(EEA 和 UK)”选项
Tips:推荐以下样式配置可以提高用户同意GDPR概率:


三、指定的广告合作伙伴
默认情况下,Google 可能不会在您的 GDPR 消息中显示您项目中集成的所有广告平台。如果您未能包含这些广告平台,可能会对您的广告收入产生不利影响。请按照本部分中的步骤操作,确保您项目中集成的所有广告平台都出现在 GDPR 消息中。
1. 在Admob后台“隐私权和消息”中点击“GDPR设置”,打开GDPR设置
2. 点击“检查您的广告合作伙伴”部分下的编辑图标
3. 选择 自行指定的广告合作伙伴 按钮
4. 参考下方表格,勾选您项目中集成的所有广告平台
TradPlus Network | Google Name |
---|---|
Meta | |
AppLovin | AppLovin Corp |
IronSource | ironSource Mobile |
Chartboost | Chartboost |
UnityAds | Unity Ads |
Ogury | Ogury Ltd |
AdColony | AdColony |
Start.io | StartApp 或 Start.io Inc |
Verve | Verve Group |
Liftoff | Liftoff |
Fyber | Fyber |
Mintegral | Mobvista/Mintegral |
Amazon | Amazon |
InMobi | InMobi Choice |
Smaato | Smaato |
Yandex | Yandex |
Bigo | BIGOAds |