|
| 1 | +--- |
| 2 | +$category@: dynamic-content |
| 3 | +formats: |
| 4 | + - websites |
| 5 | +teaser: |
| 6 | + text: Integrates wth Scroll, a better internet that doesn't rely on ads. |
| 7 | +--- |
| 8 | + |
| 9 | +<!--- |
| 10 | +Copyright 2020 The AMP HTML Authors. All Rights Reserved. |
| 11 | +
|
| 12 | +Licensed under the Apache License, Version 2.0 (the "License"); |
| 13 | +you may not use this file except in compliance with the License. |
| 14 | +You may obtain a copy of the License at |
| 15 | +
|
| 16 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 17 | +
|
| 18 | +Unless required by applicable law or agreed to in writing, software |
| 19 | +distributed under the License is distributed on an "AS-IS" BASIS, |
| 20 | +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 21 | +See the License for the specific language governing permissions and |
| 22 | +limitations under the License. |
| 23 | +--> |
| 24 | + |
| 25 | +# amp-access-scroll |
| 26 | + |
| 27 | +Lets sites in the <a href="https://scroll.com">Scroll</a> network identify Scroll members in order to serve them an ad-free, directly-monetized experience. |
| 28 | + |
| 29 | +<table> |
| 30 | + <tr> |
| 31 | + <td class="col-fourty"><strong>Required Scripts</strong></td> |
| 32 | + <td> |
| 33 | + <div> |
| 34 | + <code><script async custom-element="amp-access" src="https://cdn.ampproject.org/v0/amp-access-0.1.js"></script></code> |
| 35 | + </div> |
| 36 | + <div> |
| 37 | + <code><script async custom-element="amp-analytics" src="https://cdn.ampproject.org/v0/amp-analytics-0.1.js"></script></code> |
| 38 | + </div> |
| 39 | + <div> |
| 40 | + <code><script async custom-element="amp-access-scroll" src="https://cdn.ampproject.org/v0/amp-access-scroll-0.1.js"></script></code> |
| 41 | + </div> |
| 42 | + </td> |
| 43 | + </tr> |
| 44 | +</table> |
| 45 | + |
| 46 | +[TOC] |
| 47 | + |
| 48 | +## Behavior |
| 49 | + |
| 50 | +### Configure |
| 51 | + |
| 52 | +In `<head>`, add |
| 53 | + |
| 54 | +``` |
| 55 | +<script id="amp-access" type="application/json"> |
| 56 | +{ |
| 57 | + "vendor": "scroll", |
| 58 | + "namespace": "scroll" |
| 59 | +} |
| 60 | +</script> |
| 61 | +``` |
| 62 | + |
| 63 | +Be sure not to add a trailing comma to the namespace line, which makes it invalid JSON! |
| 64 | + |
| 65 | +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](https://amp.dev/documentation/components/amp-access#multiple-access-providers). |
| 66 | + |
| 67 | +### Make each ad conditional |
| 68 | + |
| 69 | +Add an `amp-access` attribute to each ad container. |
| 70 | + |
| 71 | +``` |
| 72 | +<div class="amp-ad-container" amp-access="NOT scroll.scroll"> |
| 73 | + <amp-ad... > |
| 74 | +</div> |
| 75 | +``` |
| 76 | + |
| 77 | +Learn more at https://developer.scroll.com/amp |
| 78 | + |
| 79 | +## Validation |
| 80 | + |
| 81 | +See [amp-access-scroll rules](https://github.com/ampproject/amphtml/blob/master/extensions/amp-access-scroll/validator-amp-access-scroll.protoascii) in the AMP validator specification. |
0 commit comments