AdMob/GAM estimated
CloudX Unity SDK 的 AdMob/GAM estimated 适配器。投放 AdMob waterfall 和 Google Ad Manager 需求的 Banner、MREC、Interstitial、Rewarded、Native 和 App Open。
该 Google 适配器同时投放 AdMob estimated 和 Google Ad Manager estimated 两种需求 — 分别对应 AdMob waterfall 和 Google Ad Manager。它支持 Banner (320×50)、MREC (300×250)、Interstitial、Rewarded、Native 和 App Open 广告格式,两种需求来源均适用。
有关 Dashboard 配置,请参阅Google Waterfall 发布商设置指南。
您获得的是哪种 Google 需求
该适配器投放两种独立的 Google 需求:
- AdMob estimated — AdMob waterfall 需求。
- Google Ad Manager estimated — Google Ad Manager 需求。
运行哪一种由控制台决定,而非代码决定。您需要在 CloudX 控制台中按广告位启用相应的广告需求来源;无需单独的制品,无需额外依赖,也无需修改应用侧代码。两种需求来源可在同一应用中同时运行,各自拥有独立的映射和 CPM 目标,也可以在同一场竞价中同时出价。
Google Ad Manager 需求需要 Unity SDK 4.5.0 或更高版本。
Google Ad Manager 的广告单元 ID 格式为 /NNNNNNN/placement/name,与 AdMob 的普通广告单元 ID 不同。
在 Assets/CloudXSdk/Editor/CloudXDependencies.xml 中取消注释 Google 适配器相关行:
<!-- Android -->
<androidPackage spec="io.cloudx:adapter-googlewaterfall:25.2.0.5"/>
<!-- iOS -->
<iosPod name="CloudXGoogleWaterfallAdapter" version="13.6.0.4" minTargetSdk="13.0"/>修改文件后,前往 Assets > External Dependency Manager > Android Resolver > Force Resolve。
AdMob 应用 ID(必需)
Google Mobile Ads SDK 需要您的 AdMob 应用 ID。缺少该 ID 会导致 iOS 应用启动时崩溃,并在 Android 上记录致命警告。请使用您 AdMob 控制台中的应用 ID。
Android
在 Assets/Plugins/Android/AndroidManifest.xml 的 <application> 内添加 meta-data:
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-XXXXXXXXXXXXXXXX~YYYYYYYYYY" />iOS
在生成的 Info.plist 中添加 GADApplicationIdentifier:
<key>GADApplicationIdentifier</key>
<string>ca-app-pub-XXXXXXXXXXXXXXXX~YYYYYYYYYY</string>iOS Info.plist 配置
SKAdNetwork IDs(iOS 14.5+ 必需)
添加 Google 的 SKAdNetwork 标识符,以便 Google 归因安装。Google 在其 Google Mobile Ads 文档 中发布了完整且最新的列表。请包含完整列表以最大化归因覆盖率。
应用追踪透明度(iOS 14+)
<key>NSUserTrackingUsageDescription</key>
<string>此标识符将用于向您投放个性化广告。</string>iOS 项目配置
链接器标志: 在 Build Settings 的 Other Linker Flags 中添加 -ObjC。
支持
如需支持,请联系 support@cloudx.io