Skip to content

PlacementControllerOptions

Options for creating a PlacementController.

optional autoTrackImpression?: boolean

Whether to track an impression automatically when the decision is visible. Default true.


optional contextMode?: RevTurbineContextMode

Context resolution mode. Default 'auto'.


optional overrides?: RevTurbinePlacementDecisionOverrides

Override segment, plan, or usage for testing.


optional placement?: RevTurbinePlacementConfig

Placement configuration (name, scope key, metadata).


optional placementExposure?: PlacementExposureMode

When the presentation-writing impression fires (plan 144 TASK-11 / REQ-17).

  • legacy_resolution (default) — at decision resolution, exactly as today.
  • render — when the placement’s visual root renders.
  • viewport — when the root scrolls into the viewport; if IntersectionObserver is unavailable it falls back to resolution (Q-8 ruling), tagged render_fallback.

Only viewport (with IntersectionObserver present) moves the placement_presentations denominator — a deliberate metric-definition change (see the plan’s Q-8 / REQ-17b). The default keeps the denominator and its history unchanged.


optional surfaceSlot?: RevTurbineSurfaceSlotConfig

Canonical surface slot configuration (preferred over placement).


optional traits?: Record<string, string | number | boolean>

Custom traits to include in the decision request.


optional ttlMs?: number

Decision cache TTL in milliseconds.


optional userId?: string

Target user ID. Falls back to the SDK’s current user context.