Skip to content

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

Open
mosherBT wants to merge 1 commit into
masterfrom
mo/analytics-v2-totalbids-adunitcode
Open

mosherBT wants to merge 1 commit 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

  • adUnitCode changes value from "unknown"; the sandbox fact job's schema doesn't read top-level adUnitCode (checked against current master).

  • analytics: report LiveIntent EIDs in V2 prebid analytics #364 touches the same payload line in analytics.md; whichever merges second needs a trivial rebase.

  • Breaking change

  • Requires release

…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 self-assigned this Oct 9, 2026
@mosherBT
mosherBT requested review from a team as code owners October 9, 2026 17:59
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.

2 participants