Commit fa1a153
New Bidder: PGAM Direct (prebid#14763)
* Add PGAM Direct bid adapter
New SSP bidder (server-to-server, canonical OpenRTB 2.6) operated by
PGAM Media LLC. Distinct from pgamssp (our legacy TeqBlaze-hosted
adapter); we plan to migrate publishers from pgamssp to pgamdirect
over 2026 and will submit a deprecation PR for pgamssp once migration
completes. Both are actively maintained.
GVL ID: 1353
Endpoint: https://rtb.pgammedia.com/rtb/v1/auction
Media types: banner, video, native
Supports: schain, TCF v2, USP, GPP, COPPA, EIDs, GPID, floors module,
deals, first-party data
37 spec cases covering isBidRequestValid, buildRequests across banner
video and native, multi-imp, consent forwarding for GDPR/USP/GPP/COPPA,
EIDs and schain passthrough, interpretResponse across all media types
including VAST XML/URL variants and native JSON parsing, malformed-
input rejection, ext.meta merge, and metadata assertions. Coverage:
100% functions, 100% lines, 82% branches.
* pgamdirect: address Codex review
Three P1s from the Codex automated review:
1. Floors module integration — imp.bidfloor now comes from bid.getFloor()
when the Floors module is enabled, falling back to params.bidfloor and
then 0. Currency is carried from the Floors-returned currency, not
hard-coded to USD. Resolves the regression where publishers on floor
rules were silently sending their static params.bidfloor.
2. schain lookup precedence — buildSource() now reads
ortb2.source.ext.schain first (the modern FPD path), falling back to
the legacy bid.schain. Resolves the drop for publishers who configure
schain through FPD rather than per-bidder params.
3. CORS preflight — removed the x-openrtb-version custom header. The
request is now CORS-simple enough to avoid a browser preflight on
every auction, reducing perceived auction latency by one RTT.
Server accepts OpenRTB 2.6 as default regardless.
Tests updated: 6 new cases covering the two P1 behaviour changes
(getFloor used, fallback to params, fallback when getFloor throws,
fallback to 0, currency preserved, ortb2 schain wins over bid.schain,
bid.schain fallback when ortb2 empty). The removed "forwards schain
from first bid" test is covered by the new "falls back to bid.schain"
case. Existing CORS assertion updated to expect absent customHeaders.
43/43 tests green in Karma/ChromeHeadless. Lint clean.
* pgamdirect: convert to TypeScript, use ortbConverter
Addresses patmmccann review on prebid#14763:
- Convert pgamdirectBidAdapter.js → .ts with typed public interface.
- Replace the hand-rolled imp/device/user/source builders with
libraries/ortbConverter, keeping only the pgam-specific fields
(imp.ext.pgam.orgId, imp.tagid from params.placementId,
meta.networkName from seatbid.seat) as converter hooks.
- Drop the contentType: 'application/json' header entirely — JSON
is NOT a CORS-simple content-type, so setting it forces a
browser preflight on every auction. Omitting it keeps the POST
preflight-free (saves one RTT per request).
The converter inherits Prebid's standard handling of:
- priceFloors module (imp.bidfloor / bidfloorcur via bid.getFloor)
- schain via FPD normalisation (source.ext.schain)
- source.tid, user.eids, site/device/regs (GDPR, USP, GPP, COPPA)
- media types (banner sizes → format[], video player size passthrough,
native request serialisation)
- bidResponse cpm/currency/ttl/netRevenue/mediaType/advertiserDomains
So this change:
- Removes ~200 lines of custom plumbing.
- Means future ORTB spec updates (2.7, new privacy fields) flow
through automatically when Prebid updates the converter.
Also:
- Register GVL ID 1353 on spec (PGAM Media LLC, registered with IAB).
- Keep params.bidfloor as a legacy fallback when the priceFloors
module has not populated imp.bidfloor.
- Force at=1 (first-price) and cur=['USD'] via a request hook.
Spec tests: trimmed to cover only the adapter-owned behaviour
(isBidRequestValid, CORS-simple options, imp hook custom fields,
request hook, bidResponse.meta.networkName, onBidWon). Library-owned
behaviour (floors / schain / GDPR / media types / VAST parsing) is
not re-asserted here; those are covered by ortbConverter's own specs
and by every other adapter that uses it. 26/26 pass locally.1 parent 6c7e0a4 commit fa1a153
2 files changed
Lines changed: 477 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
0 commit comments