Skip to content

I2I: amp-geo to add preset-us-ca #26637

@zhouyx

Description

@zhouyx

This is in preparation to support generic state level geo location to <amp-geo>. Short term solution AMP is going to stick to is to only add support to detect us-ca.

US CA Preset

Current amp-geo config

    {
      "ISOCountryGroups": {
        "soccer": [ "au", "ca", "ie", "nz", "us", "za" ],
        "football": [ "unknown" ]
      }
    }

Potential Design in the future

    {
      "GeoGroups": {
        "preset-us-ca": {
           "country": "us",
            "state": "ca",
            "confidenceThreshold": 0.8
         },
      }
    }

Because the long term solution is not finalized yet, we want to introduce a preset-us-ca group to detect us-ca. Publisher should stick to the preset until we add more generic support.

One should be able to put

    {
      "geoGroups": {
        "collect-consent": [ "preset-us-ca", "preset-eea"]
      }
    }

Self hosting

#25873
Self hosting amp-geo can also patch the state information along with the response.
For example

{
  "country": "us",
  "state": "us-ca",
  "confidenceLevel": 0.8
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    INTENT TO IMPLEMENTProposes implementation of a significant new feature. https://bit.ly/amp-contribute-code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions