-
Notifications
You must be signed in to change notification settings - Fork 749
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
Vrtcal: Added Video(VAST) Support #1965
Conversation
Can you please put a doc PR to include the new supported |
-----Mansinahar: This is actually considered as an anti-pattern. Consider a request with multiple formats, that is video and banner both set. Is your bidder service confirmed to always return a banner bid? If not necessarily then you might be assigning the wrong bid type here and that will cause the ad to not be properly rendered. Does your bidder service perhaps communicate the bid type in the bid extension? If so, we highly recommend you to use that to set the bid type.--------------Thanks for the feedback mansinahar. Our backend RTB platform only accepts single impression requests and responds with a single impression response 100% of the time so there is no possible ambiguity of bid type returned. So, this won't be an issue with our platform. Also, I've updated https://github.com/prebid/prebid.github.io/blob/master/dev-docs/bidders/vrtcal.md to include video in a pull request. Thanks again. |
@vrtcal-dev Thanks for that clarification. However, a single impression could have both video and banner set, making it a multi-format request. This is different from multi-impression requests. Also, just looking at your adapter, code I don't see the requests to your backend being broken down for each impression which means if a publisher sends Prebid Server a request with multiple impressions, that gets forwarded as is to your backend.. Would your backend consider this as an invalid request and drop it or just bid for the first impression in the list and ignore others? In either case, if your backend only accepts single impression requests, you might wanna add logic in your Prebid Server adapter code to make multiple requests to your backend server for every impression in a request or else you might be losing on publisher inventory. You can do this as a separate PR if you want to but I just wanted to bring this to your attention. |
Yes, our platform will only bid on the first impressions as we've always put this controlled spec on our backend servers...Yes possibly in the future we will support multiple impressions in a single request, but this is not in our plans at the moment. If, we do decide on such an enhancement later, I'll definitely add in another PR...Thanks again... |
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.
.
@vrtcal-dev Sounds good! Just want to bring this to your attention that Prebid Server has the capability to make multiple requests to a bidder for multiple imps in a single incoming request. So say, if a request to Prebid Server comes in with multiple imps, your adapter's |
Thank you. I've noted for future consideration. |
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.
Looks pretty straightforward to me. Just have one comment to add more test coverage
} | ||
|
||
//Failsafe default in case impression ID is not found | ||
return "", &errortypes.BadServerResponse{ |
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.
Can you please add test coverage for this case here?
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.
Can you please add test coverage for this case here?
I've added supplemental test coverage for the failsafe unmatched impression ID. Thanks.
This does not address the comment about multiformat impressions. If you receive a request for a single imp, with both the |
Correct, our bidder will always choose banner if a video object is also specified within an impression request. |
adapters/vrtcal/vrtcal.go
Outdated
@@ -70,9 +70,14 @@ func (a *VrtcalAdapter) MakeBids(internalRequest *openrtb2.BidRequest, externalR | |||
|
|||
for _, sb := range bidResp.SeatBid { | |||
for i := range sb.Bid { | |||
bidType, err := getReturnTypeForImp(sb.Bid[i].ImpID, internalRequest.Imp) | |||
if err != nil { | |||
return nil, []error{err} |
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.
Sorry, I missed this in my earlier review. In case there's an error getting the type of one of the bids, are you sure you want to return an error and discard the rest of the bids? It might be better to rather append the error in an error slice and move on to the next bid by adding a continue
here.
Thinking more about this, I realize that you mentioned your backend service only bids on a single impression for a single request so the response likely is gonna have a single bid as well but I'd still recommend adding a continue
here and appending the error to an error slice as it is easy to do and this way you won't have to update this logic in the future even when your backend service does start supporting multiple impressions and returning multiple 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.
Sorry, I missed this in my earlier review. In case there's an error getting the type of one of the bids, are you sure you want to return an error and discard the rest of the bids? It might be better to rather append the error in an error slice and move on to the next bid by adding a
continue
here.Thinking more about this, I realize that you mentioned your backend service only bids on a single impression for a single request so the response likely is gonna have a single bid as well but I'd still recommend adding a
continue
here and appending the error to an error slice as it is easy to do and this way you won't have to update this logic in the future even when your backend service does start supporting multiple impressions and returning multiple bids
Thanks Mansinahar. I've added a patch to allow the continuance of processing of further bids after ones with an unmatched Impression ID...
@vrtcal-dev Looks like there are some conflicts with the recent stuff that got merged in. Can you please rebase your PR on top of master and resolve the conflicts? |
BidType: "banner", | ||
}) | ||
bidType, err := getReturnTypeForImp(sb.Bid[i].ImpID, internalRequest.Imp) | ||
if err == 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.
@vrtcal-dev This check would just ignore the error. I'd recommend changing this to the following so that the errors are properly communicated to the user.
if (err != nil) {
errs = append(errs, err)
continue
}
bidResponse.Bids = append(bidResponse.Bids, &adapters.TypedBid{
Bid: &sb.Bid[i],
BidType: bidType,
})
You'll just. have to instantiate and errs
slice either at the start of this function or before the for loop
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.
This check would just ignore the error. I'd recommend changing this to the following so that the errors are properly communicated to the user.
Thanks mansinahar, I've udpated to properly report errored bids while continuing to proces further bids.
…elated test case update.
Docs PR: prebid/prebid.github.io#3214