mediafuseBidAdapter - Updates and Refactor#14469
mediafuseBidAdapter - Updates and Refactor#14469ibhattacharya-dev wants to merge 6 commits intoprebid:masterfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b2109f7d6e
ℹ️ 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".
| : Math.floor(adPodDurationSec / minAllowedDuration); | ||
|
|
||
| let jsTrackers = nativeAd.javascript_trackers; | ||
| const requests = fill(bidRequest, numberOfPlacements); |
There was a problem hiding this comment.
Assign unique bidIds when expanding adpod placements
createAdPodRequest clones the same bid object numberOfPlacements times without changing bidId, so every generated imp gets the same imp.id (the converter’s default id source is bidRequest.bidId). In the ORTB path, response/context lookups are keyed by imp.id, so duplicate ids collapse multiple adpod slots onto one context/request id, which can mis-map or overwrite slot-specific adpod responses when adPodDurationSec expands to more than one placement.
Useful? React with 👍 / 👎.
modules/mediafuseBidAdapter.js
Outdated
| const commonBidderParams = bidderRequest.bids && bidderRequest.bids[0] && bidderRequest.bids[0].params; | ||
| if (commonBidderParams) { | ||
| if (commonBidderParams.member) { | ||
| extANData.member_id = parseInt(commonBidderParams.member, 10); |
There was a problem hiding this comment.
Derive member_id from any bid in the request
This now reads member only from bidderRequest.bids[0]. If a batch contains a valid member+invCode bid that is not first (e.g. first bid uses placementId), member_id is omitted even though those invCode impressions require it, so bids can fail depending on bid ordering. The previous implementation searched across bids, so this is a functional regression for mixed-configuration requests.
Useful? React with 👍 / 👎.
modules/mediafuseBidAdapter.js
Outdated
| if (userSync && userSync.url) { | ||
| syncs.push({ | ||
| type: 'image', | ||
| url: userSync.url + (gdprParams ? gdprParams.replace('?', '&') : '') |
There was a problem hiding this comment.
Keep a valid query delimiter for pixel consent params
Appending GDPR params with gdprParams.replace('?', '&') assumes userSync.url already has a query string. When the sync URL is a plain path, this produces .../pixel&gdpr=... (no ?), so consent values are treated as part of the path instead of query parameters and may not be transmitted as intended.
Useful? React with 👍 / 👎.
Type of change
Bugfix
Feature
New bidder adapter
Updated bidder adapter
Code style update (formatting, local variables)
Refactoring (no functional changes, no api changes)
Build related changes
CI related changes
Does this change affect user-facing APIs or examples documented on http://prebid.org?
Other
Description of change
Refactored the mediafuseBidAdapter to follow the standard ortbConverter module.
Structure now follows MSFT Bid Adapter due to pending pending replacement of AppNexus Bid Adapter by the newer Microsoft Bid Adapter for better maintainability.
Other information