# Ad networks

> Where AdSense and AdMob policy lets ad tags run for a PWA: browser tab, installed standalone window, Trusted Web Activity, or native WebView, quoted by section.

An ad tag is JavaScript and runs anywhere a page runs, so the question for a PWA is not
whether the network's code loads but whether the network's policy covers the context the page is
shown in: a browser tab, an installed standalone window, a Trusted Web Activity, or a native app's
WebView. Google's AdSense policy distinguishes exactly those four, and the dated per-network
verdicts live in the [policy dimension](/compatibility/policy/).

## How it works

Web ad networks license their tags for web pages and route in-app inventory to a separate
mobile SDK. The boundary between the two is drawn in the policy text, and for AdSense it is
drawn around the rendering surface rather than around the installed state of the page.

### A browser tab or an installed PWA

The AdSense Program policies (last updated 2026-08-04) restrict placement by surface: "AdSense
code may not be placed in inappropriate places such as pop-ups, emails or software", and ads
may not be "integrated into a software application (does not apply to AdMob) of any kind,
including toolbars". A PWA installed from Chrome, Edge, or Safari is still rendered by that
browser from your origin; the policy names no display mode and attaches no condition to
`standalone`. What changes for measurement is the environment: a `(display-mode: standalone)`
media query matches, and a Microsoft Store install sends `Referer:
app-info://platform/microsoft-store` on its first navigation, so reports keyed on referrer domain
show such sessions apart from tab traffic.

### A Trusted Web Activity or Custom Tab

The same policy has a section "Technical requirements for web content viewing frames for apps".
Its second option lists the frames in which AdSense and Ad Manager web ads may be shown from
inside an app: "Android: Chrome Custom Tabs and Trusted Web Activities" and "iOS:
SFSafariViewController (iOS9 and iOS10 only)". A TWA on Google Play therefore keeps the web ad
tags of the origin it wraps; the Play listing itself is governed by the Spam and Payments
policies described under [Store policy](/ecosystem/stores/).

### A native WebView

For an Android `WebView` or iOS `WKWebView`, the first option in that section applies: "app
developers are encouraged to integrate the WebView API for Ads to register WebView instances"
with the Google Mobile Ads SDK, and "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". The policy adds that "content
in the WebView is subject to the same content policy requirement as when it is in a browser".
This path is AdMob's, with AdMob's payout terms, not AdSense's.

### What the policy does not settle

The AdSense text does not mention WebAPKs, desktop installed windows, or service workers. Two
consequences follow from how the page is delivered rather than from the policy: a service
worker that serves cached HTML can replay a page, and with it an ad slot, without a network
request for the page, so impression counting rests on the ad request the tag makes, not on the
page load; and an installed window has no browser chrome, so a viewability measurement that
assumes a visible tab strip measures a slightly larger viewport. Neither is a policy breach;
both are worth checking against the network's invalid-traffic guidance before launch.

| Context | AdSense web tags | Required integration | Policy anchor |
|---|---|---|---|
| Browser tab | Allowed | None | Program policies, ad placement |
| Installed PWA (WebAPK, desktop window) | Not restricted by the text | None | Program policies name no display mode |
| Trusted Web Activity / Custom Tab | Allowed | None | "Web content viewing frames", option 2 |
| Native WebView | Not allowed directly | WebView API for Ads + Google Mobile Ads SDK | "Web content viewing frames", option 1 |
| Native app UI | Not allowed | AdMob | "does not apply to AdMob" |

## Observed behaviour

:::observed
The AdSense Program policies page dated 2026-08-04 states the two sentences that decide the
matter for a wrapped PWA, in the "Technical requirements for web content viewing frames for
apps" section: option 1, "App developers are encouraged to integrate the WebView API for Ads to
register WebView instances", and option 2, listing "Android: Chrome Custom Tabs and Trusted Web
Activities" as frames where web ads may be published without the SDK. The iOS frame is limited
to "SFSafariViewController (iOS9 and iOS10 only)", so an iOS shell on a newer system falls back
to option 1.
:::

## See also

- [AdSense Program policies](https://support.google.com/adsense/answer/48182) (support.google.com)
- [display-mode media feature](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/display-mode) (developer.mozilla.org)
- [Ad network policy data](/compatibility/policy/)
- [Monetization](/ecosystem/monetization/)
- [Store policy](/ecosystem/stores/)
- [Trusted Web Activity](/reference/installation/twa/)

← Back to the [Ecosystem](/ecosystem/) overview.