• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

prebid / Prebid.js / 24914471873

24 Apr 2026 10:20PM UTC coverage: 96.398% (-0.01%) from 96.411%
24914471873

Pull #14796

github

744320
mastap150
pgamdirectAnalytics: Phase 4.2 — runner-up POST on AUCTION_END

Paired change to the bidder-edge's new /rtb/v1/shading/record
ingestion endpoint. When an AUCTION_END payload carries a pgamdirect
winner AND at least one competitor bid on the same adUnit, we POST
the competitor's highest CPM (the runner-up) plus the cell signature
from bid.ext.pgam.shade to the bidder-edge.

The backing Store learns per-cell runner-up distributions so a future
Part B activation can shade our outbound bid down toward the
runner-up + headroom, capturing the margin delta between "what our
DSP bid into us" and "what we needed to bid into Prebid to win."

Implementation:
  - maybePostShading() exported for testability. Groups bidsReceived
    by adUnitCode, identifies pgam winners per-adUnit (multi-imp
    safe), computes runner-up as max non-pgam CPM on that adUnit.
  - Skips when: <2 bids, no pgam winner, no ext.pgam.shade
    (bidder-edge didn't populate it), or runner-up is 0 (one-bidder
    auction — no signal for us).
  - Uses ajax() with text/plain content-type (CORS-simple, no
    preflight) and keepalive:true per AGENTS.md.
  - Wrapped in try/catch — a malformed AUCTION_END payload can't
    take down the main analytics POST that runs alongside it.

Spec: 7 new tests covering the happy path, multi-adUnit split,
missing-winner skip, missing-shade skip, one-bidder skip, and
malformed-input tolerance. 19/19 green.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Pull Request #14796: pgamdirectBidAdapter: enrich meta, usersync, telemetry hooks

43494 of 53470 branches covered (81.34%)

419 of 435 new or added lines in 4 files covered. (96.32%)

37 existing lines in 12 files now uncovered.

221883 of 230174 relevant lines covered (96.4%)

72.63 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

99.76
/test/spec/modules/tcfControl_spec.js


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc