-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Observe Intersection and nested AMP documents. #3265
Comments
Good point. As we formalize the viewer API we will need to require viewers to supply their own change records down to us. The current viewport implementations should, to some extend handle this already. CC @dvoytenko |
Right now we require AMP to be sized to the whole viewport ( |
@chenshay, is this something the viewer API already passes down to the document? Just trying to understand priority. |
Ping @chenshay |
we already supports a window.context API to track view-ability: https://github.com/ampproject/amphtml/blob/master/ads/README.md#ad-viewability |
If an amp-ad element exists within an AMP page that is served within an iframe, the data returned from observeIntersection will be relative to the iframe, not the parent document.
This makes sense, however it posses an issue when measuring viewability.
For example, the ad on this page is always going to be in view:
http://dfp-amp-testing-1185.appspot.com/amp_tests/dfp-image-layouts-fixed.html
Is there a way for the amp-ad element to know if it is being served within a nested AMP environment? This could help us decide if we should use the data returned from observeIntersection when making our viewability calculations.
The text was updated successfully, but these errors were encountered: