-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Vibrant Media Bid Adapter: onBidWon pixel trigger #8191
Conversation
@@ -213,7 +213,9 @@ export const spec = { | |||
* @param {*} bidData the data associated with the won bid. See example above for data format. | |||
*/ | |||
onBidWon: function(bidData) { | |||
logInfo('Bid won: ' + JSON.stringify(bidData)); | |||
if (bidData && bidData.meta && bidData.meta.wp) { | |||
triggerPixel(`${bidData.meta.wp}${bidData.status}`); |
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 make sure biddata.wp is a url?
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.
bidData.meta.wp is guaranteed to be a valid url, since it's an internal endpoint we use for reporting purposes (bids/won bids ratio and similar stats), generated server-side because we use several dynamic query string parameters in it.
We could add regex-based URL validation for bidData.meta.wp in the adapter though. Would that meet your expectations?
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.
@ChrisHuie should we go ahead and add regex-based URL validation to our adapter, to formally check bidData.meta.wp has the right format?
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.
That works :)
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.
@ChrisHuie updated accordingly, thanks :)
Type of change
Description of change
Triggered Vibrant internal pixel endpoint on bidWon event handler
contact email of the adapter’s maintainer: kormorant@vibrantmedia.com
official adapter submission
Other information