Skip to content

analytics: report totalBids and top-level adUnitCode in V2 prebid analytics - #365

Open
mosherBT wants to merge 2 commits into
masterfrom
mo/analytics-v2-totalbids-adunitcode
Open

mosherBT wants to merge 2 commits into
masterfrom
mo/analytics-v2-totalbids-adunitcode

Conversation

@mosherBT

@mosherBT mosherBT commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Why

V2 (lib/addons/prebid/analytics.ts) declares totalBids and adUnitCode but never sets them: every payload sends adUnitCode: "unknown" and no totalBids. V1 reports both. Parity gaps blocking the V1/V2 merge.

What Changed

  • toWitness: totalBids counts received bids with a non-null cpm, and is added to the payload.
  • toWitness: top-level adUnitCode is the first bid's ad unit, "unknown" when there are no bids.
  • The debug summary log now reports the real bid count.

How to Test

  • Tested — new toWitness cases: zero, one and several received bids across bidder requests; populated and fallback adUnitCode
  • Docs updated

Notes

  • Breaking change
  • Requires release

@mosherBT mosherBT self-assigned this Oct 9, 2026
@mosherBT
mosherBT requested review from a team as code owners October 9, 2026 17:59
@mosherBT
mosherBT force-pushed the mo/analytics-v2-totalbids-adunitcode branch from 1442ac6 to 1201235 Compare October 15, 2026 18:13
Comment thread lib/addons/prebid/analytics.ts
…id analytics

V2 declared both but never set them, so every payload sent adUnitCode
"unknown" and no totalBids. Match V1: the first bid's ad unit, and a count
of received bids with a cpm.
@mosherBT
mosherBT force-pushed the mo/analytics-v2-totalbids-adunitcode branch from 9626e2a to bb86c40 Compare October 19, 2026 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants