Conversation
Multi-tenant Prebid.js adapter for the goadserver platform. One bidder
code ("goadserver") serves every deployment — publishers pass the
deployment-specific host + SSP campaign token per ad unit via params.host
and params.token. The adapter POSTs to https://{host}/openrtb2/auction
(goadserver's Prebid Server-compatible endpoint) and supports banner,
video, and native via ortbConverter.
GVL ID is not yet registered with IAB Europe and is commented out in
the adapter for now; will be populated once the TCF registration lands.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fc20fa21c9
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| const host = validBidRequests[0].params.host; | ||
| const url = `https://${host}/openrtb2/auction`; | ||
| const data = converter.toORTB({ | ||
| bidRequests: validBidRequests, |
There was a problem hiding this comment.
Split bid requests by host and token
buildRequests always picks validBidRequests[0].params.host and then serializes all bids into one ORTB request, so auctions that include multiple goadserver tenants (different host and/or token values across ad units) will route impressions to the wrong endpoint and apply the wrong publisher token, leading to rejected or misattributed bids. Group requests by tenant key (host + token) and return one server request per group.
Useful? React with 👍 / 👎.
| method: 'POST', | ||
| url, | ||
| data, | ||
| options: { contentType: 'application/json', withCredentials: true }, |
There was a problem hiding this comment.
Send ORTB payload with a simple content type
Using contentType: 'application/json' makes this a non-simple cross-origin request, which triggers a CORS preflight (OPTIONS) before each auction call; that adds latency and can cause bidder timeouts or dropped responses when the endpoint does not fully handle preflight. Prebid adapters usually avoid this by posting the same JSON payload with a simple content type (for example text/plain).
Useful? React with 👍 / 👎.
Emits an optional per-impression subid in imp.ext.goadserver.subid so goadserver can attribute bids to a sub-identifier (page section, article bucket, A/B test group, etc.) without requiring a separate HB campaign per variation. Server-side normalization strips unsafe characters and caps the length at 1024. Test coverage: 22 → 24 tests (adds "emits params.subid" and "omits imp.ext.goadserver.subid when no subid is set" cases). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Implements the getUserSyncs hook so publishers using this adapter drop the goadserver persistent cookie after each auction. The sync URL is published per-deployment at response.body.ext.goadserver.usersync by the server (/openrtb2/auction), so the same adapter picks up the right pixel for every goadserver system without hardcoding hosts. Returns image or iframe syncs per syncOptions; falls back to empty when either the response has no sync entry or the publisher has disabled sync types globally. Test coverage: 24 → 29 tests (5 new getUserSyncs cases covering empty responses, missing ext, type filtering, and iframe path). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Two Tier 2 additions: 1. params.deals[] support. Publishers can now attach private marketplace deal objects per ad unit; the adapter's ortbConverter imp hook translates them into imp.pmp.deals[] in the outgoing BidRequest. Each deal object accepts id (required), bidfloor, bidfloorcur, at, wseat[], wadomain[] — matching the OpenRTB 2.5 imp.pmp.deals spec. 2. Outstream video documentation. The adapter already forwards video imps untouched via ortbConverter (including context='outstream') so no code change is needed on the request side. Added an .md section showing the standard Prebid.js ad-unit-level renderer pattern for publishers who want outstream. Test coverage: 29 → 32 tests (emits deals, omits when unset, outstream video imp shape preserved). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Attaches a Prebid.js Renderer for video bids whose ad unit requested
mediaTypes.video.context = 'outstream'. The renderer loads the
deployment-hosted player at https://{params.host}/prebid-outstream.js
which parses the VAST XML and injects a muted autoplay <video> element
into the slot with impression + click tracking. Publishers can override
the hosted script via params.outstreamRendererUrl, or fall back to a
standard ad-unit-level renderer which takes precedence.
Also prefers the Prebid Cache URL (exposed via ext.prebid.targeting
.hb_cache_url) over inline VAST XML when both are present, so large
VAST blobs don't have to live in Prebid's in-memory targeting store.
The bidRequests array is now stashed on the ServerRequest so
interpretResponse can correlate bids back to their originating ad
unit (needed to detect outstream context).
All 32 existing unit tests still pass.
Multi-tenant Prebid.js adapter for the goadserver platform. One bidder code ("goadserver") serves every deployment — publishers pass the deployment-specific host + SSP campaign token per ad unit via params.host and params.token. The adapter POSTs to https://{host}/openrtb2/auction (goadserver's Prebid Server-compatible endpoint) and supports banner, video, and native via ortbConverter.
GVL ID is not yet registered with IAB Europe and is commented out in the adapter for now; will be populated once the TCF registration lands.
Type of change
Bugfix
Feature
New bidder adapter
Updated bidder adapter
Code style update (formatting, local variables)
Refactoring (no functional changes, no api changes)
Build related changes
CI related changes
Does this change affect user-facing APIs or examples documented on http://prebid.org?
Other
Description of change
Other information