-
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
#2640 all bids in console #3022
Conversation
send 'iv' param if present and full url in `site.page`
Enhance location detection within utils
CR for enhanced-location-detection PR
Reorg gettopwindowlocation util & add tests.
set creativeId to crid if present in 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.
I need to think about the effects of this change more but there's a bunch of items that need cleaned up.
src/adapters/bidderFactory.js
Outdated
@@ -1,15 +1,30 @@ | |||
import Adapter from 'src/adapter'; | |||
import adaptermanager from 'src/adaptermanager'; | |||
import { config } from 'src/config'; | |||
import { |
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.
Please revert all non-substantive formatting changes
src/adapters/bidderFactory.js
Outdated
@@ -1,15 +1,30 @@ | |||
import Adapter from 'src/adapter'; | |||
import adaptermanager from 'src/adaptermanager'; | |||
import { config } from 'src/config'; | |||
import { | |||
config |
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.
Please revert all non-substantive formatting changes
src/adapters/bidderFactory.js
Outdated
import { | ||
userSync | ||
} from 'src/userSync'; | ||
import { |
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.
Please revert all non-substantive formatting changes
src/adapters/bidderFactory.js
Outdated
import CONSTANTS from 'src/constants.json'; | ||
import events from 'src/events'; | ||
import includes from 'core-js/library/fn/array/includes'; | ||
|
||
import { logWarn, logError, parseQueryStringParameters, delayExecution, parseSizesInput, getBidderRequest } from 'src/utils'; | ||
import { |
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.
Please revert all non-substantive formatting changes
src/adapters/bidderFactory.js
Outdated
logWarn, | ||
logError, | ||
parseQueryStringParameters, | ||
delayExecution, |
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.
Please revert all non-substantive formatting changes
src/adapters/bidderFactory.js
Outdated
// bidderRequest.end = timestamp(); | ||
let bidIds = bidsArray.map(bid => { | ||
if (bid.requestId) { | ||
return bid.requestId.toString(); |
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.
Why are you converting bid ids to strings? Seems inefficient and unecessary
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.
Existing unit tests do not consistently use strings or numeric values for id's. I was unsure if this was an issue with the tests or in place to make sure ids can be provided either as a string or int. In any case this is safer.
I could write this using a double equal, but then the cast would be implicit instead of explicit.
|
||
let missingBids = bidderRequest.bids.filter(bid => { | ||
if (bid.bidId) { | ||
return bidIds.indexOf(bid.bidId.toString()) === -1; |
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.
Why are you converting bid ids to strings? Seems inefficient and unnecessary
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.
see above
src/adapters/bidderFactory.js
Outdated
@@ -251,8 +294,7 @@ export function newBidder(spec) { | |||
break; | |||
case 'POST': | |||
ajax( | |||
request.url, | |||
{ | |||
request.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.
Please revert all non-substantive formatting changes
src/adapters/bidderFactory.js
Outdated
@@ -370,7 +412,7 @@ function validBidSize(adUnitCode, bid, bidRequests) { | |||
// if a banner impression has one valid size, we assign that size to any bid | |||
// response that does not explicitly set width or height | |||
if (parsedSizes.length === 1) { | |||
const [ width, height ] = parsedSizes[0].split('x'); | |||
const [width, height] = parsedSizes[0].split('x'); |
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.
Please revert all non-substantive formatting changes
@@ -210,9 +249,14 @@ export function newBidder(spec) { | |||
} | |||
}); | |||
|
|||
if (validBidRequests.length === 0) { |
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.
I don't understand the logic why we only want to add no bids when there are no valid bids. What's the thinking 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.
So if there is a bidderRequest.bids, but none of them are valid, this logs those bids as failed bids. This is consistent with what would currently happen if a subset of the bids are invalid.
If we want to only have no bids for valid requests we will have to use validBidRequests instead of bidderRequest.bids when looking for missing bids to maintain consistency.
Let me know what your preference is. I am fine with it either way.
missingBids.forEach(bid => { | ||
const bidRequest = bidRequestMap[bid.bidId]; | ||
bid.requestId = bid.bidId; | ||
let prebidNoBid = Object.assign(bidfactory.createBid(CONSTANTS.STATUS.NO_BID, bidRequest), bid); |
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.
With Prebid 1.0 we are not adding NO_BID to auction.
To close aucton in legacy we used to match bidsRequested and bidsReceived and hence were adding a NO_BID.
Not needed 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.
This is one of the main pieces to this ticket, so is definitely needed here. It’s adding back in “no bids” for all the missing analytics/data caused by the oversight of removing them in 1.*
Since this is a API change it needs to go into a 2.x release. |
Given the feedback, I'm thinking the only way to resolve the debug snippet not showing zero bids in Prebid 1.x is to modify the debug snippet rather the change the core |
To be honest it’s not just this “debug” call, the removal of these no bids, and even the introduced ajax timeouts (separate topic) in 1.* has resulted in quite a loss of important analytics data. I’ve personally already patched these issues, it was a roadblock for us on the upgrade and we were not ok with losing that data. Not sure what you have in mind with the debug snippet, but without changing core I’m not really sure it will cover all the cases though? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Type of change
Description of change
Addressing #2640
Made changes so that all bids are shown in console when pbjs.getBidResponses() is called.
Other information
#2640