Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 918
PubMatic: Pass alias bidder name through #4588
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -511,6 +511,15 @@ func buildRequestExtForBidder(bidder string, req *openrtb_ext.RequestWrapper, re | |||
| AlternateBidderCodes: alternateBidderCodes, | ||||
| } | ||||
|
|
||||
| if prebid := reqExt.GetPrebid(); prebid != nil && prebid.Aliases != nil { | ||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can directly use prebid as prebid-server/exchange/utils.go Line 499 in 03785de
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed extra check for prebid |
||||
| if aliasValue, ok := prebid.Aliases[bidder]; ok { | ||||
| if prebidNew.Aliases == nil { | ||||
| prebidNew.Aliases = make(map[string]string) | ||||
| } | ||||
| prebidNew.Aliases[bidder] = aliasValue | ||||
| } | ||||
| } | ||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You should be able to simplify this to:
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 IMO this is the right place for this logic. This function is called once per bidder and you're scrubbing |
||||
|
|
||||
| // Copy Allowed Fields | ||||
| // Per: https://docs.prebid.org/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html#prebid-server-ortb2-extension-summary | ||||
| if prebid != nil { | ||||
|
|
||||

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.
Please include JSON test coverage as well for this block.
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.
Added JSON test coverage