Skip to content

VDOAI Bid Adapter: adding new PBS module#4799

Open
vdo-ai-tech wants to merge 2 commits into
prebid:masterfrom
vdo-ai-tech:vdoai-bid-adapter
Open

VDOAI Bid Adapter: adding new PBS module#4799
vdo-ai-tech wants to merge 2 commits into
prebid:masterfrom
vdo-ai-tech:vdoai-bid-adapter

Conversation

@vdo-ai-tech
Copy link
Copy Markdown

Comment thread adapters/vdoai/vdoai.go
// Fallback: detect from the matching impression
for _, imp := range imps {
if imp.ID == bid.ImpID {
if imp.Video != nil {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider this as a suggestion. The current implementation follows an anti-pattern, assumes that if there is a multi-format request, the media type defaults to openrtb_ext.BidTypeVideo, nil. Prebid server expects the media type to be explicitly set in the adapter response. Therefore, we strongly recommend implementing a pattern where the adapter server sets the MType field in the response to accurately determine the media type for the impression.

Comment thread adapters/vdoai/vdoai.go
if imp.Video != nil {
return openrtb_ext.BidTypeVideo, nil
}
if imp.Banner != nil {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider this as a suggestion. The current implementation follows an anti-pattern, assumes that if there is a multi-format request, the media type defaults to openrtb_ext.BidTypeBanner, nil. Prebid server expects the media type to be explicitly set in the adapter response. Therefore, we strongly recommend implementing a pattern where the adapter server sets the MType field in the response to accurately determine the media type for the impression.

Comment thread adapters/vdoai/vdoai.go
if bid.Ext != nil {
var bidExt openrtb_ext.ExtBid
if err := jsonutil.Unmarshal(bid.Ext, &bidExt); err == nil && bidExt.Prebid != nil {
bidType, err := openrtb_ext.ParseBidType(string(bidExt.Prebid.Type))
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider this as a suggestion. Prebid server expects the media type to be explicitly set in the adapter response. Therefore, recommends implementing a pattern where the adapter server sets the MType field in the response to accurately determine the media type for the impression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants