analytics: per-bidder EID delivery and troubleshooting fields in auction_processed - #351
Draft
MO-Thibault wants to merge 1 commit into
Draft
MO-Thibault wants to merge 1 commit into
MO-Thibault wants to merge 1 commit into
Conversation
…ion_processed Per-bidder delivery as a bitmask over the auction's optableSources, omitted when a bidder received every source. Adds slotSeq, t0, consent flags, cache age and idsMs, first-auction page config (RTD registration and both auctionDelay values), and Prebid Server bid matching with an unmatched count. Storage writes a <cacheKey>:ts sibling so cache age can be measured. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
|
Should we add this to V2 (prebid/analytics.ts) too ? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the fields we kept missing during enrichment and uplift investigations to the V1 analytics add-on (
lib/addons/prototypes/analytics.js), which feedsbid_analytics. Each one maps to a case that needed a browser harness or a partner conversation because the table could not answer it.Per-bidder EID delivery, with no payload growth in the normal case. Today each bidder request's
optableSourcesis computed and then collapsed into one auction-level union, so we cannot tell whether a given bidder received our IDs (ddm: whethermsftgot any after theappnexusrename). Each bidder request now carriesom, a bitmask over the auction-leveloptableSources(biti=optableSources[i]). It is omitted when the bidder received every source, which is the common case, so most payloads do not change. Absent means all sources;0means none.New fields
bidderRequests[].omoptableSourcesbidderRequests[].bids[].src"s2s"for Prebid Server responsesunmatchedBidsslotSeqt0consentcacheAgeidsMst0)page{ rtdOptable, rtdDelay, udDelay }Documented in
lib/addons/prototypes/README.md.Prebid Server responses
On ddm,
prebidServerrequests show about 6.7M per day with 0 priced bids recorded. The likely cause is that s2s bid responses carry arequestIdthat matches no clientbidId, sotrackAuctionEnddrops them. Received bids that do not match now fall back to the same bidder code and ad unit (first bid still waiting for a response), keepsrc: "s2s", and anything still unmatched is counted inunmatchedBids. Not yet verified on a live Prebid Server page;unmatchedBidswill tell us whether the fallback catches them.Core change
LocalStorage.setTargetingnow also writes<cacheKey>:tswith the write time, andclearTargetingremoves it. The cache value itself is unchanged, so wrappers that parseOPTABLE_RESOLVEDare unaffected. Control-group clearing that removesOPTABLE_RESOLVEDdirectly leaves the:tskey behind, which is harmless: analytics reports an age only when the cache itself is present.Not in this PR
bid_analyticsETL still needs columns for these fields (separate change in optable-solutions). Until then they are only in the raw payload.lib/addons/prebid/analytics.ts) is unchanged.Test plan
lib/addons/prototypes/analytics.test.js(14 tests):omomitted and masked,slotSeqcounting,t0, each consent bit, the three cache states and custom key, page config on the first auction only, s2s fallback match, unmatched count, client bids unchanged.lib/core/storage.test.js::tswritten onsetTargeting, removed onclearTargeting.pnpm build-libpasses.pnpm formatleaves no diff.auction_processedpayload.unmatchedBids.🤖 Generated with Claude Code