This guide is designed to provide additional information for SSPs and Ad Exchanges that want to support AMPHTML ads in a Real-Time Bidding (RTB) environment. The IAB's OpenRTB 2.5 spec is here.
AMP pages must ensure all content conforms to the AMP format. When non-AMP content is included in an AMP page, there can be a delay as the content is verified. A major benefit for AMPHTML ads on AMP pages is that the ad can be rendered early by splicing the ad into the surrounding AMP page, without affecting the UX of the page and without delay.
For those new to AMPHTML ads, see the background docs at the bottom of this article.
Exchanges will need to indicate in the RTB bid request whether a page is built in AMP, and any specific requirements or treatment of AMPHTML ads. As of OpenRTB 2.5, this is not yet included in the spec, but the proposed implementation to the IAB committee is as follows.
Site
Object additional field: amp
A new field is added to the Site
object of the OpenRTB standard to indicate whether a webpage is built on AMP. In OpenRTB 2.5, this is section 3.2.13.
Field | Scope | Type | Default | Description |
---|---|---|---|---|
amp |
optional | integer | - | Whether the request is for an AMP Document. 0 = page is non-AMP, 1 = page is built with AMP HTML. AMP status unknown if omitted. |
Imp
Object additional field: ampad
A new field is added to the Imp
object of the OpenRTB standard to provide more detail around AMP ad requirements and how AMP ads will load. In OpenRTB 2.5, this is section 3.2.4.
Field | Scope | Type | Default | Description |
---|---|---|---|---|
ampad |
optional | integer | 1 | AMPHTML ad requirements and rendering behavior. See AMPHTML Ad Status Table. |
AMPHTML Ad Status Table
Value | Description |
---|---|
1 | AMPHTML ad requirements are unknown. |
2 | AMPHTML ads are not allowed. |
3 | Either AMPHTML or non-AMPHTML ads are allowed; AMPHTML ads are not early rendered. |
4 | Either AMPHTML or non-AMPHTML ads are allowed, and AMPHTML ads are early rendered. |
5 | AMPHTML ads are required. Ads that are non-AMPHTML may be rejected by the publisher. |
500+ | Exchange-specific values; should be communicated to bidders a priori |
SSPs will need to provide a new field in the bid response to allow bidders to return AMPHTML content, and RTB bidders will need to populate that field in order to return AMPHTML ads. As of OpenRTB 2.5, this is not yet included in the spec, but the proposed workflow is a new field that accepts a URL pointing to AMP ad content.
Bid
Object additional field: ampadurl
Field | Type | Description |
---|---|---|
ampadurl |
string | Optional means of conveying AMPHTML ad markup in case the bid wins; only one of ampadurl or adm should be set. Substitution macros (Section 4.4) may be included. URL should point to a creative server containing valid AMP Ad html. |
- For AMPHTML ads to be rendered early, the exchange is required to verify and sign in real time that the ad is written in amp4ads
<html amp4ads>
creative format. - See "Proposed Design" for signing.
- Ads that are valid AMPHTML ads will be allowed to render early by AMP pages. Ads that are not verified as valid AMPHTML ads will render at the same speed as non-AMPHTML ads.
- Only AMPHTML ads should be returned in the
ampadurl
.
- For AMPHTML ads to be rendered early, AMPHTML ad content must be fetched with 0 additional "hops" from the client. This is designed to avoid poor user experiences due to ad latency and extra client-side calls.
- The exchange's servers (not the client browser) will request the AMPHTML ad content located at the URL provided in
ampadurl
after a bidder wins the auction. - Creative servers must respond and return content within some reasonable SLA, recommended at 150ms.
- The AMPHTML ad will be injected into the adslot and subsequently rendered. Note that since a valid AMPHTML ad cannot contain an iframe or another ad tag, the server-side fetch must retrieve the actual HTML of the creative.
- RTB buyers often include impression trackers as a structured field in the bid response (for example
Bid.burl
, the "billing notice URL" in OpenRTB 2.5). - It is up to the exchange or publisher ad server to determine how these URLs are fired, but
<amp-pixel>
and<amp-analytics>
can handle most impression tracking and analytics use cases.
- AMPHTML Ads for AMP Pages (Github)
- AMPHTML Ad Creative Format Spec (Github)
- AMPHTML Ads Overview (Github)
- AMPHTML Ads Website from amp.dev
- Example AMPHTML Ads
- Speed comparison: see how fast an AMP Ad loads in comparison to a regular ad. Best viewed on a 3G connection.
- Discussion in OpenRTB Dev Forum: RTB Specific Proposal