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
🐛 amp-analytics: allow intersectionRatio to be used on :root #19280
Conversation
Currently, ${intersectionRatio} expands to "" when applied to :root. This is a problem for supporting GPT with AMP Inabox because we watch :root and need to support publishers subscribing to changes in slot visibility. [1] Expand support to include :root. [1] https://developers.google.com/doubleclick-gpt/reference#googletag.events.slotVisibilityChangedEvent
@@ -363,6 +363,7 @@ export class VisibilityManager { | |||
|
|||
} else { | |||
state['opacity'] = this.getRootMinOpacity(); | |||
state['intersectionRatio'] = this.getRootVisibility(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One question I have is that interesectionRatio
doesn't make much sense for root other than inabox use case. And if we also need to update the document?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree intersectionRatio
doesn't make much sense for root
outside the Inabox case, but I think it's not a problem to support it?
By "And if we also need to update the document?" did you mean the documentation? I just added that: 9f286fc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha totally meant documentation! LTGM, Thanks!
…ect#19280) * amp-analytics: allow intersectionRatio to be used on :root Currently, ${intersectionRatio} expands to "" when applied to :root. This is a problem for supporting GPT with AMP Inabox because we watch :root and need to support publishers subscribing to changes in slot visibility. [1] Expand support to include :root. [1] https://developers.google.com/doubleclick-gpt/reference#googletag.events.slotVisibilityChangedEvent * update docs to not be element specific
Currently,
${intersectionRatio}
expands to""
when applied to:root
. This is a problem for supporting GPT with AMP Inabox because we watch:root
and need to support publishers subscribing to changes in slot visibility. [1] Expand support to include:root
.[1] https://developers.google.com/doubleclick-gpt/reference#googletag.events.slotVisibilityChangedEvent