利用 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 投放的所有广告的开放式衡量合作伙伴名称。
如需使用第三方可见度提供商,请在 Ad Manager 界面中配置该提供商,并将订单项配置为使用该可见度提供商。如需了解详情,请参阅配置移动应用可见度提供商。
确保透明叠加层不会遮挡广告
如果广告未被视为遭到遮挡,遮挡广告的视图必须具有以下设置之一:
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 in Google Mobile Ads SDK (Android) versions 18.1.0 and later.\u003c/p\u003e\n"],["\u003cp\u003eThe Open Measurement SDK (OM SDK) integrates with the Mobile Ads SDK, enabling third-party viewability measurements using the Open Measurement Interface Definition (OMID).\u003c/p\u003e\n"],["\u003cp\u003eMost ad formats (Banner, Interstitial, Rewarded, Native, and Native Custom with video) automatically support Open Measurement with no extra setup.\u003c/p\u003e\n"],["\u003cp\u003eTransparent overlays obscuring ads must have \u003ccode\u003ealpha = 0\u003c/code\u003e or \u003ccode\u003evisibility = View.GONE\u003c/code\u003e or \u003ccode\u003evisibility = View.INVISIBLE\u003c/code\u003e to avoid impacting viewability measurements.\u003c/p\u003e\n"],["\u003cp\u003eEnsure mediation partners support Open Measurement and be aware that overlaying views and test device labels can affect viewability measurement accuracy.\u003c/p\u003e\n"]]],[],null,["Open Measurement is an IAB standard that allows publishers to use third-party\nviewability providers to verify impressions and click measurements.\nGoogle Mobile Ads SDK\n\nsupports Open Measurement starting with version\n18.1.0. This and later versions of Google Mobile Ads SDK\n\nintegrates with the\n[Open Measurement (OM) SDK](https://iabtechlab.com/standards/open-measurement-sdk/)\nto enable third-party viewability measurement.\n\nGoogle Mobile Ads SDK supports OM SDK version 1.4.\n\nPrerequisites \\* Google Mobile Ads SDK 18.1.0 or higher.\n\n- Complete [Get started](/ad-manager/mobile-ads-sdk/android/quick-start).\n\n\u003c!-- --\u003e\n\n- A configured [viewability\n provider](//support.google.com/admanager/answer/9025968#configure-a-viewability-provider) assigned to your line item.\n\nImplement Open Measurement\n\nGoogle Mobile Ads SDK automatically implements Open Measurement using\n**\"Google\"** as the Open Measurement partner name for all ads served using the\nGoogle Mobile Ads SDK.\n\nTo use a third-party viewability provider, configure it in the\nAd Manager 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| **Note:** Custom native ad formats that don't render a video asset require a custom Open Measurement integration. For more information, see [Display-type Custom Native Ad Formats and Open Measurement](/ad-manager/mobile-ads-sdk/android/custom-native-omid).\n\nEnsure that transparent overlays are non-obstructing\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\nBe aware of the following when implementing Open Measurement:\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](/ad-manager/mobile-ads-sdk/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."]]