-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prebid Core: Support for multiple bidder codes from a single adapter #8216
Prebid Core: Support for multiple bidder codes from a single adapter #8216
Conversation
Changed net revenue to True
Syncing with Upstream
This pull request introduces 1 alert when merging eaa0603 into 3fbea52 - view on LGTM.com new alerts:
|
src/adapters/bidderFactory.js
Outdated
@@ -235,6 +236,12 @@ export function newBidder(spec) { | |||
onBid: (bid) => { | |||
const bidRequest = bidRequestMap[bid.requestId]; | |||
if (bidRequest) { | |||
if (isUnknownBidder(bid.bidderCode, bidRequest.bidder)) { | |||
logWarn(bid.bidderCode + ' is not a registered partner or known bidder. Continuing without bids.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the warning, please mention the original bidder name, inform that the current bid will not be accepted, and also mention that allowUnknownBidderCodes
should be true
in bidder settings to allow passing such bids.
An Org can be seen in Prebid as,
I would like to keep things simple. |
@pm-harshad-mane, I'll see if we can re-discuss the requirements again. If we agree on reducing the scope, I'll come back to ask to revert the changes to |
My preference is keep things as simple as possible for the user to understand. It feels complicated to me for the user to understand that there's a relationship between bidder codes that can cause settings such as If I create an alias of Seems to me the simplest way conceptually to handle bids with a different bidder code is to only apply bid settings for the bidder code attached to the bid. Targeting key settings should work the same way. If you want a custom targeting key for |
…/Prebid.js into unknown-bidder-support-02
@pm-azhar-mulla, if you revert the changes to The missing |
Hi @dgirardi, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, with the caveats above - we are reducing the scope to just enforcement of allowAlternate
bidderSettings config, leaving out proposed changes to adapterCode
fallbacks and the PBS adapter.
@pm-harshad-mane we need your second review and we need docs |
@pm-azhar-mulla , Please link the documentation PR to this PR. Let's say |
@pm-harshad-mane, Prebid Server is not involved at all here - I don't understand what you mean. This affects exclusively client-side adapters whose backends want to bid on behalf of other bidder codes. For PBS, there's a separate |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Type of change
Description of change
With respect to draft 8129. We have made changes to the bidderFactory.js.
After receiving the bids from adapters, we look for eligible bids depending upon values of
allowAlternateBidderCodes
andallowedAlternateBidderCodes
values inbidderSettings
.If
allowAlternateBidderCodes
is false for given bidder, we log warning on console and ignore the bid.If
allowAlternateBidderCodes
is true andallowedAlternateBidderCodes
is specified in terms of an array, we look for respective bidderCode in that array. If we find the bidderCode we continue otherwise again we log the warning on console and ignore the bidIf
allowAlternateBidderCodes
is true andallowedAlternateBidderCodes
is not specified or value forallowedAlternateBidderCodes
is['*']
then we don't apply any restrictions.After bid is considered as eligible, we add
adapterCode
property to the bid which represents name of the adapter through which the bid was initiated.@bretg @patmmccann This is an initial draft, we are in process of testing and adding unit test cases. Please share your views on the same.
Checklist for the above feature