Feature request: Ability to vary or remove page content based on geo
There are several use cases for needing to vary or remove content (including ads) that is displayed on a page depending on the location of the reader:
-- When somebody views a page in the UK, don't show ads. When viewed outside the UK, the ads should show. -- When presenting a page in the US, there should be a "Sports" menu that includes links for "NFL", "MLB", "NBA", etc. When presenting the menu in the UK, it might show "Football", "Formula 1", "Cricket", etc. Other locations might have further variation.
We also have a use case whereby we geo block articles (redirect - 302) from a user from a given GEO (Country) from viewing an article. This lookup occurs if we insert ESI code processed by our CDN before serving a page to an end user which if matches the condition will redirect user to an unavailable page.
The other use case is the ability to vary content (articles) on the same URL between GEO's (Country), by supplied geo params from the CDN to Origin.
@stephanfowler
Another use case would be the ability to pass the lat/lon to an endpoint returning data for <amp-list>, such as:
- local stores selling items featured in the article
- local discounts
- nearby events tickets and discovery
- route/transit time/information
Worth noting that the request to the endpoint specified by the src attribute of <amp-list> will always be made from the client (even if the AMP document is served from the AMP cache), so geolocating based on IP may be an acceptable fallback.
Main use-case is handled by amp-geo
lat/lon for amp-list is tracked under https://github.com/ampproject/amphtml/issues/8929
Closing