-
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
Bugfix add bid parameters if not present #3808
Merged
Merged
Changes from 42 commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
afdf755
initial orbidder version in personal github repo
hendrikiseke1979 ffc6f0b
use adUnits from orbidder_example.html
hendrikiseke1979 5c9a947
replace obsolete functions
hendrikiseke1979 06d127e
forgot to commit the test
hendrikiseke1979 8617515
check if bidderRequest object is available
hendrikiseke1979 8b5c884
try to fix weird safari/ie issue
hendrikiseke1979 4eace10
Merge remote-tracking branch 'upstream/master'
hendrikiseke1979 8d9dd6f
merge changes from upstream
hendrikiseke1979 699d05d
fetch changes from upstream
hendrikiseke1979 367b1a7
ebayK: add more params
hendrikiseke1979 cfe0911
update orbidderBidAdapter.md
hendrikiseke1979 4279c11
use spec.<function> instead of this.<function> for consistency reasons
hendrikiseke1979 5625d93
fetch changes from upstream
hendrikiseke1979 67dc263
Merge branch 'feature/RAAS-2676'
hendrikiseke1979 89fb80b
fetch changes from upstream
hendrikiseke1979 ab665e9
fetch changes from upstream
hendrikiseke1979 b91d68d
fetch changes from upstream
393b3fe
fetch changes from upstream
d0b0cbc
fetch changes from upstream
hendrikiseke1979 5967f6e
fetch changes from upstream
hendrikiseke1979 df95b81
fetch changes from upstream
hendrikiseke1979 6169ec7
fetch changes from upstream
b05496f
add bidfloor parameter to params object
5a3d816
fetch changes from upstream
4c95866
fetch changes from upstream
hendrikiseke1979 e27e3dd
fetch changes from upstream
hendrikiseke1979 1470e8e
fetch changes from upstream
hendrikiseke1979 476c431
fix gdpr object handling
hendrikiseke1979 ff62c25
fetch changes from upstream
hendrikiseke1979 e011950
fetch changes from upstream
hendrikiseke1979 ba295b6
fetch changes from upstream
hendrikiseke1979 605fb7f
fetch changes from upstream
hendrikiseke1979 91d90fc
fetch changes from upstream
415af96
fetch changes from upstream
hendrikiseke1979 8906bcd
Merge branch 'master' of github.com:hiseke/Prebid.js
hendrikiseke1979 da8dbde
default to consentRequired: false when not explicitly given
hendrikiseke1979 07c805c
wip - use onSetTargeting callback
mathiasmethner0815 86664b5
add tests for onSetTargeting callback
mathiasmethner0815 0664e97
fix params and respective tests
RainerVolk4014 d11fca0
Merge pull request #2 from hiseke/feature/fix-params-onSetTargeting
cbcb311
fetch changes from upstream
hendrikiseke1979 b17d19b
Merge branch 'master' of github.com:hiseke/Prebid.js
hendrikiseke1979 a102857
fetch changes from upstream
udojuettner6667 534cf58
fetch changes from upstream
hendrikiseke1979 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 to confirm - is this logic correct?
I checked through the code and the
spec.bidParams
appears to be populated during thebuildRequests
function by reading thebid.params
field from thebidRequest
object.The
bid
object that's passed into theonSetTargeting
gets a copy of theparams
from thebidRequest
object when thebid
object is processed through the prebid code (which is read from the setup in the adUnit object for your bidder).Given the above - it seems unlikely that this current if statement would return
true
. Can you please review/confirm?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.
Hmmm, you're right - if we can rely on
bid.params
always being defined. I will discuss with @arneschulz1984, and we will update this PR accordingly. Thanks for finding!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.
@hiseke and I just tested it with the current prebid version (2.15.0). What we see (reproducible):
onHandler
is called viaonBidWon
,bid.params
is defined and contains the expected data.onHandler
is called viaonSetTargeting
,bid.params
is undefined.I don't know whether this is expected behavior or a prebid bug or some timing issue. But under these conditions, it seems like we have to check
bid.params
forundefined
. Do you agree?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 you be able to provide some test params for your adapter so I can review both scenarios? I tried to use the ones in the md file, but I'm getting a 403 error on the request to your server.
Below is a copy of the details for reference:
URL:
https://orbidder.otto.de/bid
Data/Payload:
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.
There are some validations happening. You can use the dev endpoint
https://dev.orbidder.otto.de/bid
with a payload of{"pageUrl":"https://dev.orbidder.otto.de/zzz/","bidId":"aaaa0000bbbb1111","auctionId":"cccccc-dddd","transactionId":"eeeeee-ffff","adUnitCode":"/111111111/orbidder_test","sizes":[[728,90]],"params":{"accountId":"orbidder-test","placementId":"center-banner"}}
and the cookieCookie: aditionUserId=6666666666666666666
. If you receive a 204 ("No Content"), just retry a couple of times ...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.
Hi @ujuettner
Do some of those validations look at the actual request headers? I've tried to setup the test with the values you suggested, but I've just been seeing 204s come back after repeated attempts.
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.
Hey @jsnellbaker , if you continue to see 204, it's most likely that the cookie is not set correctly (its name is
aditionUserId
and its value has to be known to the DSP, e.g.6666666666666666666
is a valid value for testing). The followingcurl
command just worked from my laptop and from a GCE VM:Could you please just retry by copy&pasting the aforementioned
curl
command?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.
@ujuettner
While the curl command did return the ad response, it wasn't loading through the adapter where the onBidWon and onSetTargeting functions occur which is what I hoping to look at. That said, I tried a different browser and some other temporary edits to get the test payload/cookie you provided to successfully return an ad through the adapter.
I observed both events triggered and through some console.log statements I added in the adapter to print the values - I saw both sets of params were present in both events.
For reference, below is a screenshot of the console log statements based on what I saw from the onBidWon event (the onSetTargeting had the same output):
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.
Hi @jsnellbaker , thanks for coming back on this. I've deployed a temporary prebid.js build with some console.log's onto dev.orbidder.otto.de, and I still find bid.params being undefined on the /targeting route:
As there seem to be circumstances where bid.params can be undefined, I'd happy to keep the check for undefined :-)
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.
Alright - if you're 100% certain this logic should be like this, then we can leave it as is.