Skip to content

Prebid Integration

Integrates Yaleo placements into Prebid.js using the yaleo bidder adapter from the official Prebid.js repository (v10+).

See Yaleo Bid Adapter for bidder params and integration details.

js/apps/yaleo-bidder/server is an Express server that handles OpenRTB requests from Prebid.js. It fetches placement configuration and ads from Xandr, then serializes the result as pre-rendered HTML returned as a Prebid bid.

js/apps/yaleo-bidder/client is injected into the pre-rendered HTML and hydrates the placement once it is rendered in the publisher page. It handles dynamic behavior: dispatching analytics events, adjusting the host iframe size, and applying parent page media queries to the iframe.

Dark theme can be forced when the server renders the placement HTML:

  1. Per ad unit — set forceDarkTheme: true in the yaleo bidder params.
  2. Request-wide — set device.ext.darkmode: 1 on the OpenRTB request (via Prebid ortb2). The server maps this to dark theme for every placement that does not set forceDarkTheme.

Per-ad-unit forceDarkTheme takes precedence over device.ext.darkmode.

When neither is set, the hydrated client may still enable dark theme via publisher-specific detectors, and via prefers-color-scheme on known dark-theme sites.

See Yaleo Bid Adapter → Dark Theme for configuration examples.

A Prebid.js adapter that runs all placement and ad fetching logic client-side, with rendering provided by https://cdn.adnz.co/yaleo/prebid.js (part of js/apps/yaleo).

See Yaleo Legacy Bid Adapter for params.

See Migration from Legacy Adapter for migration steps.

  • Multi-ad placements were not supported. Prebid.js does not allow sequential requests within a single auction. For multi-ad placements, the placement configuration (which includes the number of ads) must be fetched first, followed by a separate ad request — a flow the legacy adapter could not support.
  • Could not be published in the official Prebid.js repository. The adapter explicitly loaded an external JS script, which violates Prebid.js required adapter rules.
  • Required redundant parameters. Publishers had to specify the Xandr tag ID explicitly, even though it is already part of the Yaleo placement configuration.