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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃摉 Update documentation for amp-consent integration in ad #15493

Merged
merged 3 commits into from May 23, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 8 additions & 4 deletions ads/README.md
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will not be correct after we add predefined consent policy : )

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed offline. We'll amend this once that feature is turned on.

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