adQuery Bid Adapter: standardize adapter request and response handling#14775
Conversation
…agation, user sync payload, and response parsing to use consistent and modern structures.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e961b445f7
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| if (!userId) { | ||
| userId = eids[0]?.uids?.[0]?.id; | ||
| } |
There was a problem hiding this comment.
Use only adquery.io IDs for bidQid
When no adquery.io EID exists, this fallback now takes the first EID from any source and sends it as bidQid. In mixed-ID setups (e.g. UID2/ID5 first in the list), that forwards a non-Adquery identifier to the Adquery endpoint, which changes prior behavior (previously it generated a local fallback ID) and can both mis-key user matching and leak unrelated IDs to this bidder.
Useful? React with 👍 / 👎.
| if (!userId) { | ||
| // onetime User ID | ||
| const ramdomValues = Array.from(window.crypto.getRandomValues(new Uint32Array(4))); | ||
| userId = ramdomValues.map(val => val.toString(36)).join('').substring(0, 20); | ||
| const randomValues = Array.from(window.crypto.getRandomValues(new Uint32Array(4))); | ||
| const randomPart = randomValues.map(val => val.toString(36)).join('').substring(0, 26); | ||
| userId = `qd_${randomPart}`; | ||
| logMessage('generated onetime User ID: ', userId); |
There was a problem hiding this comment.
Persist generated fallback qid between bid requests
For requests without userIdAsEids, the adapter now generates a fresh random bidQid on every buildRequest call and does not persist it. In auctions with multiple Adquery bids, this produces different IDs within the same page view, reducing match consistency and breaking the previous single-session fallback behavior that reused one generated ID.
Useful? React with 👍 / 👎.
Coverage Report for CI Build 24773319629Coverage increased (+0.004%) to 96.38%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats💛 - Coveralls |
Type of change
Description of change
Standardizes adapter logic by updating user ID handling, consent propagation, user sync payload, and response parsing to use consistent and modern structures.