Skip to content

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.

Element

() => void

VisibilityOptions = {}

() => void