跳转到内容

广告网络

发布于

广告代码用 JavaScript 在网页中展示广告,页面能运行的地方它也能运行。PWA 还要核对广告网络是否允许对应的展示场景。Google AdSense 政策区分浏览器标签页、已安装的独立窗口、Trusted Web Activity 和原生应用 WebView 这四种场景,各网络的结论和核对日期见政策维度。

Web 广告网络授权网页使用广告代码,应用内广告则使用单独的移动端 SDK。具体边界由政策规定。AdSense 按内容显示在什么界面中区分,不按页面是否已安装区分。

AdSense 计划政策(2026-08-04 最近更新)按表面限制投放:「AdSense code may not be placed in inappropriate places such as pop-ups, emails or software」,广告也不得「integrated into a software application (does not apply to AdMob) of any kind, including toolbars」。从 Chrome、Edge 或 Safari 安装的 PWA 仍由该浏览器从你的源渲染;政策没有点名任何显示模式,也没有对 standalone 附加条件。变化的是度量环境:(display-mode: standalone) 媒体查询会匹配,从 Microsoft Store 安装的应用在首次导航时会发送 Referer: app-info://platform/microsoft-store(Microsoft Learn),所以按 referrer 域名分组的报表会把这类会话与标签页流量分开。

同一政策有一节「Technical requirements for web content viewing frames for apps」。其第二个选项列出了可以从应用内展示 AdSense 与 Ad Manager Web 广告的框架:「Android: Chrome Custom Tabs and Trusted Web Activities」以及「iOS: SFSafariViewController (iOS9 and iOS10 only)」。因此 Google Play 上的 TWA 可以沿用其封装站点的 Web 广告代码;Play 上架本身受商店政策中描述的垃圾内容与付款政策约束。

对 Android WebView 或 iOS WKWebView,适用该节的第一个选项:「app developers are encouraged to integrate the WebView API for Ads to register WebView instances」并使用 Google Mobile Ads SDK,且「AdMob and Ad Manager in-app ads may be shown in an app next to a WebView as long as the Google Mobile Ads SDK is in use」。政策补充「content in the WebView is subject to the same content policy requirement as when it is in a browser」。这种集成方式适用 AdMob 的结算条款,不适用 AdSense 的条款。

AdSense 文本没有提到 WebAPK、桌面已安装窗口或 Service Worker。Service Worker 返回缓存的 HTML 时,无需向网络请求页面就能再次显示页面和广告位,因此展示次数取决于广告代码发出的请求,不取决于页面加载。已安装窗口没有浏览器外壳,若可见性测量假定标签栏可见,就会量到略大的视口。这两种情况源于页面的加载和显示方式,都不违反政策;上线前仍应对照广告网络的无效流量指引核对。

场景 AdSense Web 代码 所需集成 政策依据
浏览器标签页 允许 无 计划政策,广告投放位置
已安装 PWA(WebAPK、桌面窗口) 文本未加限制 无 计划政策未点名显示模式
Trusted Web Activity / Custom Tab 允许 无 「Web content viewing frames」选项 2
原生 WebView 不允许直接投放 WebView API for Ads + Google Mobile Ads SDK 「Web content viewing frames」选项 1
原生应用界面 不允许 AdMob 「does not apply to AdMob」

← 返回生态总览。