New Adapter: Optidigital#4287
Merged
Merged
Conversation
optidigital PBS adapter
Code coverage summaryNote:
optidigitalRefer here for heat map coverage report |
8 tasks
ccorbo
reviewed
Apr 11, 2025
ccorbo
reviewed
Apr 11, 2025
Code coverage summaryNote:
optidigitalRefer here for heat map coverage report |
ccorbo
approved these changes
Apr 25, 2025
Comment on lines
+10
to
+14
| // This file actually intends to test static/bidder-params/optidigital.json | ||
| // | ||
| // These also validate the format of the external API: request.imp[i].ext.prebid.bidder.optidigital | ||
|
|
||
| // TestValidParams makes sure that the optidigital schema accepts all imp.ext fields which we intend to support. |
Collaborator
There was a problem hiding this comment.
NIP: I suggest removing all comments.
Comment on lines
+62
to
+69
| for _, seatBid := range response.SeatBid { | ||
| for i := range seatBid.Bid { | ||
| bidResponse.Bids = append(bidResponse.Bids, &adapters.TypedBid{ | ||
| Bid: &seatBid.Bid[i], | ||
| BidType: openrtb_ext.BidTypeBanner, | ||
| }) | ||
| } | ||
| } |
Collaborator
There was a problem hiding this comment.
IMO, it's better to add code like this:
for _, seatBid := range response.SeatBid {
for i, bid := range seatBid.Bid {
bidType, err := getMediaTypeForBid(bid)
if err != nil {
return nil, []error{err}
}
b := &adapters.TypedBid{
Bid: &seatBid.Bid[i],
BidType: bidType,
}
bidResponse.Bids = append(bidResponse.Bids, b)
}
}
func getMediaTypeForBid(bid openrtb2.Bid) (openrtb_ext.BidType, error) {
switch bid.MType {
case openrtb2.MarkupBanner:
return openrtb_ext.BidTypeBanner, nil
default:
return "", fmt.Errorf("Unable to fetch mediaType in multi-format: %s", bid.ImpID)
}
}
I know that right now you're only using "banner", but in the future You might want to change something, and this approach will make it easier.
przemkaczmarek
approved these changes
May 20, 2025
shunj-nb
pushed a commit
to ParticleMedia/prebid-server
that referenced
this pull request
Jun 13, 2025
prnvgupta
pushed a commit
to automatad/prebid-server
that referenced
this pull request
Dec 3, 2025
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.
This PR introduces the Optidigital bidder adapter for Prebid Server.
Related PR: prebid/prebid.github.io#5976
Maintainer Contact: prebid@optidigital.com