How to render amp-ad with 50% viewport?

84 Views Asked by At

Is it possible to configure or implement viewport check and inside amp-ad?

Only solution that I could reach was data-loading-strategy="0", but this approach loads ad on 0% ~ 1% viewport...

1

There are 1 best solutions below

0
On BEST ANSWER

Found solution via window.context.observeIntersection.

Docs: https://github.com/ampproject/amphtml/blob/main/ads/README.md#ad-viewability