observeVisibility
observeVisibility(
element,onVisible,options?): () =>void
Defined in: analytics.ts:179
Fire onVisible once, when the element has been meaningfully on screen.
Where IntersectionObserver does not exist, this fires immediately rather than never: under-counting every impression in older browsers would be a silent, systematic bias in the numbers a customer is billed and optimised against. Over-counting there is the lesser wrong, and it is at least visible.
Parameters
Section titled “Parameters”element
Section titled “element”Element
onVisible
Section titled “onVisible”() => void
options?
Section titled “options?”VisibilityOptions = {}
Returns
Section titled “Returns”() => void