Skip to content

Commit

Permalink
πŸ“– Update documentation for amp-consent integration in ad (#15493)
Browse files Browse the repository at this point in the history
* Update ad consent doc.

* nit

* update
  • Loading branch information
lannka committed May 23, 2018
1 parent f7aa31d commit 2511506
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions ads/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,11 @@ Note that if the creative needs to resize on user interaction, the creative can
### amp-consent integration
If [amp-consent](https://github.com/ampproject/amphtml/blob/master/extensions/amp-consent/amp-consent.md) extension is used on the page, `data-block-on-consent` attribute
can be added to `amp-ad` element to respect the corresponding `amp-consent` policy.
In that case, the `amp-ad` element will be blocked for loading until the consent
responded. Once `amp-ad` is unblocked, 3rd party ad scripts can access the consent
related information via the following
`window.context` APIs.
In that case, the `amp-ad` element will be blocked from loading until the consent accepted.
Individual ad network can override this default consent handling by putting a `consentHandlingOverride: true` in `ads/_config.js`.
Doing so will unblock the ad loading once the consent is responded. It will be then the ad network's responsibility
to respect user's consent choice, for example to serve non-personalized ads on consent rejection.
AMP runtime provides the following `window.context` APIs for ad network to access the consent state.

<dl>
<dt><code>window.context.initialConsentState</code></dt>
Expand All @@ -244,6 +245,9 @@ related information via the following
</dd>
</dl>

After overriding the default consent handling behavior, don't forget to update your publisher facing
documentation with the new behaviors on user's consent choices.

### Optimizing ad performance

#### JS reuse across iframes
Expand Down

0 comments on commit 2511506

Please sign in to comment.