Browser plugins for @trawl/ortb3.
pnpm add @trawl/ortb3-web @trawl/ortb3import { createAdSlots, item, banner } from "@trawl/ortb3"
import { consent, sync, topics } from "@trawl/ortb3-web"
const slots = createAdSlots([
item("imp-1", banner([300, 250])),
])
slots.use(consent(() => window.__tcfapi("getTCData")))
slots.use(topics())
slots.demand({
name: "dsp-a",
endpoint: "https://dsp-a.example.com/bid",
}).with(sync("image", () => "https://dsp-a.example.com/sync"))Global plugin that sets TCF consent on the request. Adds regs.ext.gdpr and user.ext.consent.
Demand plugin that fires a cookie sync pixel ("image") or iframe ("iframe") on response.
Global plugin that sets Topics API results to user.ext.browsing_topics. Skips if the API is unavailable.
@trawl/ortb3^0.1.0