ampproject / ampproject/amphtml

[amp-subscription] for ad-free site

Open
#32,961 4 comments 0 reactions 1 assignee Claimed by @jpettitt View on GitHub
Component: amp-subscriptions Component: amp-subscriptions-google Stale Type: Discussion/Question
Dominant language
JavaScript
Stars
14.9k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

We know that SWG was developed mainly for real paywalls and premium content. However, we want to use SwG for an ad-free site and not only in the WWW version, but also via AMP.

To make it even more complex, we don't use any accounts on our site and we don't store any data on our servers for privacy reasons. We only use the LocalStorage to store necessary data and to keep it for performance reasons.

In fact, this works perfectly in the WWW version. In combination with Google SignIn (via server-side oAuth) and SwG we get all the signals we need to make the site ad-free or not.

Under AMP it's a bit different - and here we need your help.

If we include amp-subscriptions and configure a local service (via amp-access-iframe - https://github.com/ampproject/amphtml/issues/21395) and additionally SwG, it works, but with limitations:

- isAccessibleForFree (see https://github.com/ampproject/amphtml/issues/27262).

In principle, every article is accessible and readable for everyone. A subscription with us would only hide the banners. However, "isAccessibleForFree: true" ensures that the Entitlements are not retrieved. The behavior here differs from the normal web implementation, where the property can remain set to "false" and the Entitlements will still be retrieved.

- amp-access-iframe (see https://github.com/ampproject/amphtml/issues/21395)

Works fine, thanks for this solution. We can use it to switch to our TLD without any problems and fetch the data stored in LocalStorage.

However, this seems pointless - at least for our case - to create a local service at all:

- The Google News Viewer does not attract the local service.
- The data (e.g. username) can not be used any further

Another problem is the lack of mechanisms to show or hide ads. What works fine with amp-access, unfortunately did not work with subscription-display.

Maybe we abuse SwG too much, but we find the use of SwG for an ad-free version really exciting. Especially in combination without own login and without own paywall.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.