AMP

amp-access-scroll

Integrates wth Scroll, a better internet that doesn't rely on ads.

Required Scripts

<script async custom-element="amp-access-scroll" src="https://cdn.ampproject.org/v0/amp-access-scroll-0.1.js"></script>
<script async custom-element="amp-access" src="https://cdn.ampproject.org/v0/amp-access-0.1.js"></script>

Lets sites in the Scroll network identify Scroll members in order to serve them an ad-free, directly-monetized experience.

Required Scripts
<script async custom-element="amp-access" src="https://cdn.ampproject.org/v0/amp-access-0.1.js"></script>
<script async custom-element="amp-analytics" src="https://cdn.ampproject.org/v0/amp-analytics-0.1.js"></script>
<script async custom-element="amp-access-scroll" src="https://cdn.ampproject.org/v0/amp-access-scroll-0.1.js"></script>

Behavior

Configure

In <head>, add

<script id="amp-access" type="application/json">
{
  "vendor": "scroll",
  "namespace": "scroll"
}
</script>

Be sure not to add a trailing comma to the namespace line, which makes it invalid JSON!

If you are already using amp-access for a paywall, follow the steps in the amp-access documentation for using namespaces and an array of providers.

Make each ad conditional

Add an amp-access attribute to each ad container.

<div class="amp-ad-container" amp-access="NOT scroll.scroll">
  <amp-ad... >
</div>

Learn more at https://developer.scroll.com/amp

Validation

See amp-access-scroll rules in the AMP validator specification.

Precisa de mais ajuda?

You've read this document a dozen times but it doesn't really cover all of your questions? Maybe other people felt the same: reach out to them on Stack Overflow.

Ir para Stack Overflow
Found a bug or missing a feature?

The AMP project strongly encourages your participation and contributions! We hope you'll become an ongoing participant in our open source community but we also welcome one-off contributions for the issues you're particularly passionate about.

Ir para o GitHub