利用 Google 移动广告 SDK 实现 Open Measurement
开放式衡量是一种 IAB 标准,利用该标准,发布商可以使用第三方可见度服务提供程序来验证展示次数和点击次数的衡量。Google 移动广告 SDK 18.1.0 及更高版本支持开放式衡量。此版本及更高版本的 Google 移动广告 SDK 需要与 Open Measurement (OM) SDK 集成,才能实现由第三方来衡量可见度。
Google 移动广告 SDK 支持 OM SDK 1.4 版。
前提条件
* Google 移动广告 SDK 18.1.0 或更高版本。
启用开放式衡量
Google 移动广告 SDK 会自动使用 “Google” 作为使用 Google 移动广告 SDK 投放的所有广告的开放式衡量合作伙伴名称,从而实现开放式衡量。
如需使用第三方可见度服务提供商,请在 AdMob 界面中进行配置,并将订单项配置为使用该可见度服务提供商。如需了解详情,请参阅配置移动应用可见度提供商。
确保透明叠加层不会遮挡广告
为了避免广告被视为被屏蔽,遮挡广告的视图必须采用以下某种设置:
visibility = View.GONE
或 visibility = View.INVISIBLE
遮挡的视图是否具有透明背景并不重要 - 决定视图是否阻挡了广告的因素是视图的 alpha 值和可见性值。
如果 Open Measurement SDK 检测到广告上有遮挡,可能会影响可见度提供商对相应展示是否可见的判断。要解决此问题,请将视图的 alpha 值设为 0
,或将可见性设为 View.GONE
或 View.INVISIBLE
。
问题排查
实现开放式衡量时,请注意以下几点:
您必须向中介合作伙伴进行核实,了解他们是否支持对其呈现的广告进行开放式衡量。
被叠加视图遮挡的广告可能无法注册进行可见度衡量。如需了解详情,请参阅确保透明叠加层不会遮挡内容。
在测试设备(包括 Android 模拟器)上,测试广告标签会被检测为不会遮挡广告视图。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-02-21。
[null,null,["最后更新时间 (UTC):2025-02-21。"],[[["Open Measurement is an IAB standard allowing publishers to use third-party verification for impressions and clicks, supported by the Google Mobile Ads SDK for Android (version 18.1.0 and later)."],["The Mobile Ads SDK integrates with the Open Measurement SDK (OM SDK) to enable third-party viewability measurements for Banner, Interstitial, Rewarded, and Native ad formats."],["Ensure any transparent overlays on top of ads have `alpha = 0` or `visibility = View.GONE/INVISIBLE` to avoid obstructing viewability measurements."],["Open Measurement requires the Google Play Services SDK on devices and is not supported for AdMob campaigns; check with mediation partners for their support."]]],["The Google Mobile Ads SDK, version 18.1.0 and later, supports Open Measurement (OM) using the OM SDK 1.4, enabling third-party viewability verification for impressions and clicks. To use this, configure your desired provider in the AdMob UI and set line items accordingly. Ensure overlaying views do not obstruct ads by setting their alpha to 0 or visibility to GONE/INVISIBLE. Note that AdMob campaigns and some mediation partners do not have OM support. The \"Test Ad\" label is not considered obstructing on test devices.\n"]]