利用 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-08-31。
[null,null,["最后更新时间 (UTC):2025-08-31。"],[[["\u003cp\u003eOpen 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).\u003c/p\u003e\n"],["\u003cp\u003eThe 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.\u003c/p\u003e\n"],["\u003cp\u003eEnsure any transparent overlays on top of ads have \u003ccode\u003ealpha = 0\u003c/code\u003e or \u003ccode\u003evisibility = View.GONE/INVISIBLE\u003c/code\u003e to avoid obstructing viewability measurements.\u003c/p\u003e\n"],["\u003cp\u003eOpen Measurement requires the Google Play Services SDK on devices and is not supported for AdMob campaigns; check with mediation partners for their support.\u003c/p\u003e\n"]]],["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"],null,["# Open Measurement with the Google Mobile Ads SDK\n\nOpen Measurement is an IAB standard that allows publishers to use third-party\nviewability providers to verify impressions and click measurements.\n\n\nGoogle Mobile Ads SDK\n\n\nsupports Open Measurement starting with version\n18.1.0. This and later versions of\n\nGoogle Mobile Ads SDK\n\n\nintegrates with the\n[Open Measurement (OM) SDK](https://iabtechlab.com/standards/open-measurement-sdk/)\nto enable third-party viewability measurement.\n\n\nGoogle Mobile Ads SDK\n\nsupports OM SDK version 1.4.\n\nPrerequisites\n-------------\n\n\\* Google Mobile Ads SDK 18.1.0 or higher.\n\n- Complete [Get started](/admob/android/quick-start).\n\nImplement Open Measurement\n--------------------------\n\n\nGoogle Mobile Ads SDK\n\nautomatically implements Open Measurement using\n**\"Google\"** as the Open Measurement partner name for all ads served using the\n\n\nGoogle Mobile Ads SDK\n\n.\n\nTo use a third-party viewability provider, configure it in the\nAdMob UI, and configure your line items to use that viewability\nprovider. For more details, see [Configure a mobile app viewability provider](//support.google.com/admanager/answer/9025968).\n\nEnsure that transparent overlays are non-obstructing\n----------------------------------------------------\n\nFor an ad to not be considered blocked, the view that is obscuring the ad must\nhave one of these settings:\n\n- `alpha = 0`, or,\n\n\u003c!-- --\u003e\n\n- `visibility = View.GONE` or `visibility = View.INVISIBLE`\n\nIt doesn't matter if the obscuring view has a transparent background, the\nview's alpha and visibility values are what determine whether the view is\nblocking your ad.\n\nIf the Open Measurement SDK detects an obstruction over the ad, it could impact\nwhether a viewability provider considers the impression viewable. To fix this,\nset your view's alpha to `0` or\n\nset the visibility to `View.GONE` or `View.INVISIBLE`.\n\n\nTroubleshooting\n---------------\n\nBe aware of the following when implementing Open Measurement:\n\n- No support for [AdMob campaigns](//support.google.com/admob/answer/6162747).\n\n\u003c!-- --\u003e\n\n- You must check with the mediation partner to learn if they support Open\n Measurement for ads they render.\n\n- Ads that are obscured by overlaying views might not register viewability\n measurements. For more information, refer to [Ensure that transparent overlays\n are non-obstructing](#obstructing).\n\n- On [test devices](/admob/android/test-ads#enable_test_devices), including the\n Android simulator, the **Test Ad** label is detected as non-obstructing\n to the ad view."]]