# 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.

Ad tags are JavaScript that displays ads wherever a web page can run. For a PWA, check whether the network's policy allows the context in which the page appears: a browser tab, an installed standalone window, a Trusted Web Activity, or a native app's WebView. Google's AdSense policy distinguishes these four contexts; dated per-network verdicts are available 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 policy defines the boundary. AdSense distinguishes rendering surfaces; whether the page
is installed does not determine which rules apply.

### 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. A service worker serving cached HTML can replay a page and its ad slot without a network request for the page. Impression counting then depends on the tag's ad request, not the page load. An installed window has no browser chrome, so a viewability measurement that assumes a visible tab strip measures a slightly larger viewport. These effects come from page delivery, not policy, and neither breaches the policy. Check both 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

:::note
The [AdSense Program policies](https://support.google.com/adsense/answer/48182) page (last updated 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". Option 2 lists "Android: Chrome Custom Tabs and Trusted Web
Activities" as other supported viewing 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.