-
Notifications
You must be signed in to change notification settings - Fork 0
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
PE-123: Add More Metadata in site.ext.blockthrough #5
PE-123: Add More Metadata in site.ext.blockthrough #5
Conversation
modules/BTBidAdapter.js
Outdated
const { blockthrough } = bid.params; | ||
if (!isPlainObject(blockthrough) || !Object.keys(blockthrough).length) { | ||
logWarn( | ||
'BT Bid Adapter: a object type "blockthrough" with site ids and adblock data must be provided.' |
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.
Extremely nitpicky, but an object type "blockthrough"
might sound a bit better
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.
also, maybe site ids
should be changed. as we expect only 1 site id and 1 org id, right?
modules/BTBidAdapter.js
Outdated
logWarn('BT Bid Adapter: a string type "orgID" must be provided.'); | ||
return false; | ||
} | ||
|
||
if (!siteId || !isStr(siteId)) { | ||
logWarn('BT Bid Adapter: a string type "siteId" must be provided.'); | ||
if (!blockthrough.websiteID || !isStr(blockthrough.websiteID)) { | ||
logWarn('BT Bid Adapter: a string type "websiteID" must be provided.'); | ||
return false; | ||
} | ||
|
||
if (!isBoolean(ab)) { | ||
if (!isBoolean(blockthrough.ab)) { |
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.
Would it be better to mention that these params have to be provided in the blockthrough
level in the log warnings?
modules/BTBidAdapter.js
Outdated
'ext.prebid.blockthrough.auctionID', | ||
blockthrough.auctionID | ||
); | ||
delete blockthrough.auctionID; |
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.
Just for my information, could you clarify why we have to delete auctionID
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.
it was to not send it under site.ext
modules/BTBidAdapter.js
Outdated
@@ -32,8 +38,17 @@ function imp(buildImp, bidRequest, context) { | |||
const { params, ortb2Imp } = bidRequest; | |||
|
|||
if (params) { | |||
const { siteId, ab, ...btBidParams } = params; | |||
const { blockthrough, ...btBidParams } = params; |
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.
if I got this correctly, we use btBidParams
here, but btBidderParams
in up-browser for the same object config. do you think it makes sense to use the same naming?
modules/BTBidAdapter.js
Outdated
const { blockthrough } = bid.params; | ||
if (!isPlainObject(blockthrough) || !Object.keys(blockthrough).length) { | ||
logWarn( | ||
'BT Bid Adapter: a object type "blockthrough" with site ids and adblock data must be provided.' |
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.
also, maybe site ids
should be changed. as we expect only 1 site id and 1 org id, right?
modules/BTBidAdapter.js
Outdated
@@ -89,14 +104,25 @@ function bidResponse(buildBidResponse, bid, context) { | |||
* @returns {boolean} True if the bid request is valid, false otherwise. | |||
*/ | |||
function isBidRequestValid(bid) { | |||
const { ab, siteId } = bid.params; | |||
const { blockthrough } = bid.params; |
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.
should we also validate here whether btBidParams
config was provided?
prebid#10628) * Flipp Bid Adapter: initial release * Added flippBidAdapter * OFF-372 Support DTX/Hero in flippBidAdapter (#2) * support creativeType * OFF-422 flippBidAdapter handle AdTypes --------- Co-authored-by: Jairo Panduro <[email protected]> * OFF-465 Add getUserKey logic to prebid.js adapter (#3) * Support cookie sync and uid * address pr feedback * remove redundant check * OFF-500 Support "startCompact" param for Prebid.JS #4 * set startCompact default value (#5) * fix docs * use client bidding endpoint * update unit testing endpoint * OFF-876 [Prebid Adapter] Check userKey for empty string (#6) * add more checks to userKey * update document * add uuid format statement * modify docs --------- Co-authored-by: Jairo Panduro <[email protected]>
* Flipp Bid Adapter: initial release * Added flippBidAdapter * OFF-372 Support DTX/Hero in flippBidAdapter (#2) * support creativeType * OFF-422 flippBidAdapter handle AdTypes --------- Co-authored-by: Jairo Panduro <[email protected]> * OFF-465 Add getUserKey logic to prebid.js adapter (#3) * Support cookie sync and uid * address pr feedback * remove redundant check * OFF-500 Support "startCompact" param for Prebid.JS #4 * set startCompact default value (#5) * fix docs * use client bidding endpoint * update unit testing endpoint * OFF-876 [Prebid Adapter] Check userKey for empty string (#6) * add more checks to userKey * update document * add uuid format statement * modify docs * fix network id --------- Co-authored-by: Jairo Panduro <[email protected]>
* PE-87: Implement Prebid Adapter (#1) * PE-87: implement BT Bid Adapter * PE-87: rework adapter to use ortbConverter lib, make requested changes * PE-87: update imports * PE-110: Add user sync logic to the Prebid Adapter (#3) * PE-110: add user sync logic * PE-110: update userSync url * PE-110: check if iframe is enabled before setting params * PE-111: BT Prebid Adapter can request AA ads or regular ads (#2) * PE-120: Send Prebid Bidder info to BT Server (#4) * PE-120: add btBidderCode to the bid object * PE-120: use single quotes for logs string * PE-123: Add More Metadata in site.ext.blockthrough (#5) * PE-123: send additional meta data * PE-123: send auctionID under imp.ext.prebid.blockthrough * PE-123: use ortb2 config to set site.ext params * PE-123: sent auctionId in ext.prebid.blockthrough.auctionID * PE-123: update logs for bidderConfig setup * PE-000: check if blockthrough is defined (#6) * PE-87: remove BT specific logic (#7) * Implement Blockthrough Prebid Adapter * PE-87: Implement Prebid Adapter - misc fixes (#9) * PE-87: rename test file, add bidder config * PE-87: increase ttl * PE-000: fix test * BP-74: Change the way we enable debug (#10) * BP-79: Send GPID as a part of `imp[].ext` (#11) * BP-79: send gpid in imp.ext * BP-79: add optional operator * BP-90: Update Cookie Sync Logic (#12) * BP-90: pass bidder to cookie sync * BP-90: update sync logic, fix typo * BP-90: use const for syncs variable * BP-55: Re-add endpoint URLs (#13) * BP-91: Add prebid JS version to auction request (#14)
Story
PE-123
Send additional data to Prebid Server auction. Update docs and tests
up-browser PR
Testing
What tests did you perform to ensure that this code functions as expected?