Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

amp clarification #2194

Merged
merged 1 commit into from
Aug 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 26 additions & 6 deletions dev-docs/show-prebid-ads-on-amp-pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ To set up Prebid to serve ads into your AMP pages, you'll need:

+ An account with a [Prebid Server][PBS] instance
+ One or more Prebid Server Stored Bid Requests. A Stored Bid Request is a partial OpenRTB JSON request which:
+ Specifies properties like timeout and price granularity
+ Specifies properties like currency, schain, price granularity, etc.
+ Contains a list of demand partners and their respective parameters
+ An AMP page containing at least one amp-ad element for an AMP ad network that supports Fast Fetch and AMP RTC

Expand All @@ -52,19 +52,38 @@ To set up Prebid to serve ads into your AMP pages, you'll need:

You will have to create at least one Stored Request for Prebid Server. Valid Stored Requests for AMP pages must contain an `imp` array with exactly one element. It is not necessary to include a `tmax` field in the Stored Request, as Prebid Server will always use the smaller of the AMP default timeout (1000ms) and the value passed via the `timeoutMillis` field of the `amp-ad.rtc-config` attribute (explained in the next section).

An example Stored Request is given below:
An example Stored Request is given below. You'll see that the Stored Request contains some important info
that doesn't come from /amp parameters:

- cur
- schain
- ext.prebid.cache.bids - needed to let Prebid Server know that you want it to store the result in PBC
- ext.prebid.targeting.pricegranularity - needed to let Prebid Server know how to calculate the price bucket
- ext.prebid.aliases
- bidders and their parameters

```html

{
"id": "some-request-id",
"cur": ["USD"],
"source": {
"ext": {
"schain": {
...
}
}
},
"site": {
"page": "prebid.org"
"page": "prebid.org" // will be overridden by the 'curl' parameter on /amp endpoint
},
"ext": {
"prebid": {
"cache": {
"bids": {}
},
"targeting": {
"pricegranularity": { // This is equivalent to the deprecated "pricegranularity": "medium"
"pricegranularity": { // This is equivalent to "pricegranularity": "medium"
"precision": 2,
"ranges": [{
"max": 20.00,
Expand All @@ -86,10 +105,10 @@ An example Stored Request is given below:
]
},
"ext": {
"appnexus": {
"bidderA": {
// Insert parameters here
},
"rubicon": {
"bidderB": {
// Insert parameters here
}
}
Expand All @@ -98,6 +117,7 @@ An example Stored Request is given below:
}

```
This basic OpenRTB record will be enhanced by the parameters from the call to the [/amp endpoint](prebid-server/endpoints/openrtb2/amp.html).

### AMP content page

Expand Down