-
Notifications
You must be signed in to change notification settings - Fork 741
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
New Adapter: VisibleMeasures #2560
Conversation
Please merge in the latest changes from the |
@SyntaxNode last changes from |
url: "https://cs.visiblemeasures.com/pserver?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&redir={{.RedirectURL}}" | ||
userMacro: "[UID]" |
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.
redirect url returns 404 status response
url: https://cs.visiblemeasures.com/pserver?gdpr=&gdpr_consent=&us_privacy=&redir=https%3A%2F%2Fprebid.adnxs.com%2Fpbs%2Fv1%2Fsetuid%3Fbidder%3Dvisiblemeasures%26gdpr%3D%26gdpr_consent%3D%26f%3Di%26uid%3D%5BUID%5D
https://prebid.adnxs.com/pbs/v1/setuid?bidder=visiblemeasures&gdpr=&gdpr_consent=&f=i&uid=[UID]
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.
It fixed, should works now
if index, found := impMap[impID]; found { | ||
if index.Banner != nil { | ||
return openrtb_ext.BidTypeBanner, nil | ||
} | ||
if index.Video != nil { | ||
return openrtb_ext.BidTypeVideo, nil | ||
} | ||
if index.Native != nil { | ||
return openrtb_ext.BidTypeNative, 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.
This is an anti-pattern. Also, this for loop code assumes that impression could either be Banner or Video and not both. But single impression can have both banner and video in the request. In that case, this code will just assumes that it is banner.
Ideally, you should set response bid type based on bidder server response.
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 our case we don't support multi format, and we are also satisfied with the banner in that case.
Сould you please share what it should look like correctly?
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.
Since multi format bid is not supported so currently made changes should be enough. Also as an fyi, openrtb2.BidResponse
has MType
field which can be set in bidder server response and then used in MakeBids
to determine impression type
refer https://github.com/prebid/openrtb/blob/main/openrtb2/bid.go#L322-L334
// Attribute:
// mtype
// Type:
// integer
// Description:
// Type of the creative markup so that it can properly be
// associated with the right sub-object of the BidRequest.Imp.
// Values:
// 1 = Banner
// 2 = Video
// 3 = Audio
// 4 = Native
MType MarkupType `json:"mtype,omitempty"`
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! GTG after one more approval.
Doc: prebid/prebid.github.io#4312