ampproject / ampproject/amphtml
Deferred loading of AMP advertising with AMP-GEO check is impacting CWV score
- Dominant language
- JavaScript
- Stars
- 14.9k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
### Description
We currently display ads to users on WS pages outside of the UK only. e.g. https://www.bbc.com/afrique
We use amp-geo to determine the location of the use, before we display advertising.
- On AMP pages for WS we have to wait for the amp-geo script to load in which removes the amp-geo-loading class, which in turn stops hiding the ad component
- We can’t make the amp-geo script blocking as it doesn’t determine geolocation itself, but calls another script.
- Unless we have a different way to determine whether we can show ads on amp, I don’t think we can improve the CLS for pages served from amp cache
- Our current option to improve this score is to reserve white space across any service that has been enabled for ads both within the UK and outside the UK on AMP
Write up of investigation is here https://github.com/bbc/simorgh/issues/9161
Issue to reserve whitespace for WS languages is here: https://github.com/bbc/simorgh/issues/9204
### Reproduction Steps
Go to https://www.bbc.com/afrique using a VPN outside the UK
Accept consent
Note ads load
Notice impact to CLS and LCP scores
### 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
Assessment
This issue has not been assessed yet.