ampproject / ampproject/amphtml

Geo override is broken, or docs are conflicting & incomplete

Open
#38,493 3 comments 0 reactions 1 assignee Claimed by @erwinmombay View on GitHub
P3: When Possible Stale Type: Bug
Dominant language
JavaScript
Stars
14.9k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

### Description

It's unclear how to set geo overrides for testing geolocation based consent flows (`amp-geo` + `amp-consent`), and I'm not sure if the docs are complete or correct, as I haven't managed to get it to work...

Expected:

- opt in to to either the experimental or beta channel (it's unclear which, and they're mutually exclusive)
- add #amp-geo=gb to the URL coerce `amp-geo` to read GB
- see a class on HTML: `amp-iso-country-gb`

Actual:

- see a class on HTML: `amp-iso-country-au`

---
I think I originally posted this issue in the wrong place: https://github.com/ampproject/amp.dev/issues/6454; this issue template is quite different, so I'll post a short version here, there are more details about the conflicting info in the docs at that issue.

### Reproduction Steps

The [playground example](https://playground.amp.dev/?url=https%3A%2F%2Fpreview.amp.dev%2Fdocumentation%2Fexamples%2Fuser-consent%2Fgeolocation-based_consent_flow&format=websites) fails (as do my local attempts based on it):

- Given I've opted to experiments (also tried beta) in at https://cdn.ampproject.org/experiments.html
- And https://amp-dev.cdn.ampproject.org/experiments.html
- When I visit https://amp.dev/documentation/examples/user-consent/geolocation-based_consent_flow/#amp-geo=us%20us-ca
- Then I should see ``

Actually, I still see `amp-iso-country-au`

### Relevant Logs

_No response_

### Browser(s) Affected

_No response_

### OS(s) Affected

_No response_

### Device(s) Affected

_No response_

### AMP Version Affected

_No response_

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.