UsePlacementResult
UsePlacementResult =
object
Result returned by the usePlacement hook.
Properties
Section titled “Properties”ctaClick
Section titled “ctaClick”ctaClick: (
ctaTarget?,metadata?) =>Promise<void>
Activate an authored CTA index, or record a legacy target-only click.
Parameters
Section titled “Parameters”ctaTarget?
Section titled “ctaTarget?”string | number
metadata?
Section titled “metadata?”Returns
Section titled “Returns”Promise<void>
exposureBasis
Section titled “exposureBasis”exposureBasis:
ExposureBasis|null
How the placement’s visual root was exposed, or null before it enters the
viewport (plan 144 TASK-9). 'render_fallback' when IntersectionObserver
is unavailable (AC-10). Only meaningful once UsePlacementResult.exposureRef is attached.
exposureRef
Section titled “exposureRef”exposureRef: (
element) =>void
Ref callback to attach to the placement’s true visual root (plan 144
TASK-9). RevTurbine observes when that element enters the viewport for
viewport-qualified exposure; when IntersectionObserver is unavailable it
falls back to render (exposure_basis: 'render_fallback', AC-10). Attaching
it is optional and never adds a wrapper element (REQ-18/REQ-19).
Parameters
Section titled “Parameters”element
Section titled “element”Element | null
Returns
Section titled “Returns”void
snooze
Section titled “snooze”snooze: (
seconds?,ctaIndex?) =>Promise<void>
Snooze this occurrence, optionally attributing it to an authored CTA index.
Parameters
Section titled “Parameters”seconds?
Section titled “seconds?”number
ctaIndex?
Section titled “ctaIndex?”number
Returns
Section titled “Returns”Promise<void>