-
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
add meta key to interpreted bid response #5358
Conversation
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. Need one more unit test
@@ -423,6 +423,7 @@ describe('bidders created by newBidder', function () { | |||
expect(bidObject.originalCurrency).to.equal(bid.currency); | |||
expect(doneStub.calledOnce).to.equal(true); | |||
expect(logErrorSpy.callCount).to.equal(0); | |||
expect(bidObject.meta).to.exist; |
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 add a separate unit test. Assert that values are being copied properly
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
@@ -307,6 +307,7 @@ export function newBidder(spec) { | |||
// creating a copy of original values as cpm and currency are modified later | |||
bid.originalCpm = bid.cpm; | |||
bid.originalCurrency = bid.currency; | |||
bid.meta = bid.meta || Object.assign({}, bid[bidRequest.bidder]); |
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.
Took me a couple minutes to realize what bid[bidRequest.bidder]
was. Figured it out, then noticed you explained it in the PR text as well haha 🤦
Looks good!
* add adomain to bid.meta in spotx adapter this puts the adomain key in the right spot, related to #5358 and partially solves #3115 for SpotX * Update spotxBidAdapter.js * Update spotxBidAdapter.js * unit test for adomain on spotx adapter * Update spotxBidAdapter_spec.js * Update spotxBidAdapter_spec.js
* remove these adapters from 4.0 (#5369) Co-authored-by: sumit sharma <sumit.sharma1@SYNPUNLT9114TFL.SYNAPPNXS.local> * add meta key to interpreted bid response (#5358) * add meta key to interpreted bid response * add more unit tests Co-authored-by: sumit sharma <sumit.sharma1@SYNPUNLT9114TFL.appnexus.com> Co-authored-by: sumit sharma <sumit.sharma1@SYNPUNLT9114TFL.SYNAPPNXS.local> * add adomain to bid.meta in spotx adapter (#5401) * add adomain to bid.meta in spotx adapter this puts the adomain key in the right spot, related to #5358 and partially solves #3115 for SpotX * Update spotxBidAdapter.js * Update spotxBidAdapter.js * unit test for adomain on spotx adapter * Update spotxBidAdapter_spec.js * Update spotxBidAdapter_spec.js * adds advertiserDomains meta to the pubmatic adapter (#5402) * adds advertiserDomains meta * Update pubmaticBidAdapter.js * unit test for meta.advertiserDomains to pubmatic * Update pubmaticBidAdapter_spec.js * TCF Purpose 1 and Purpose 2 enforcement for Prebid v4.0 (#5336) * TCF v2.0 enforcement * test/spec/modules/gdprEnforcement_spec.js * add check for gdpr version * add logInfo message * remove comment and store value of PURPOSES in an object * add gvlid check * add unit tests for validateRules function * remove purposeId parameter from validateRules function * add extra tests * make failing unit test case pass * deprecate allowAuctionWithouConsent with tcf 2 workflow * add extra checks for defaults * remove tcf 2 test page * add strict gvlid check * add comments and shorten log messages * shorted log messages * add unit tests for setEnforcementConfig * add gvlid for alias and gvlMapping support * remove gvlid check * add support to add gvlid for aliases Co-authored-by: Jaimin Panchal <email@example.com> * add advertiserDomains meta field to ix adapter (#5404) * add advertiserDomains meta field to ix adapter * Update ixBidAdapter.js * Update ixBidAdapter_spec.js * Update ixBidAdapter_spec.js * add adomain to bid.meta in telaria adapter (#5400) * add adomain to bid.meta in telaria adapter this puts the adomain key in the right spot, related to #5358 and partially solves #3115 for Telaria * Remove digitrust from prebid server js adapter (#5438) * Update prebidServerBidAdapter_spec.js * Update index.js * Interactive advertising bureau digitrust exit (#5429) * Removing DigiTrust ID system core. * Removing test spec for digitrust id. * Removing DigiTrust references from eids test spec. Co-authored-by: Chris Cole <goosemanjack@gmail.com> * Delete serverbidBidAdapter.md (#5477) deprecated in favor of consumable adapter * Set cookie domain in pubcid / userid on main domain, not subdomain (#5500) * update formatting * update formatting * requested changes implemented * add unit test * add test case for missing adomain in ix adapter (#5422) * add test case for missing adomain in ix adapter at request of @ix-prebid-support on #5404 * Update ixBidAdapter_spec.js * Update ixBidAdapter_spec.js * Update ixBidAdapter_spec.js * drop support for userId configs with the `usersync` config object (#5427) * drop support for userId configs with the `usersync` config object, per deprecation notice * changes on drop support (#1) * Update userIdTargeting.md * Update userId.md * Update userId_spec.js * Update britepoolIdSystem.md * Update sharedIdSystem.md Co-authored-by: Patrick McCann <patmmccann@gmail.com> Co-authored-by: sumit sharma <sharmasumit116@gmail.com> Co-authored-by: sumit sharma <sumit.sharma1@SYNPUNLT9114TFL.SYNAPPNXS.local> Co-authored-by: sumit sharma <sumit.sharma1@SYNPUNLT9114TFL.appnexus.com> Co-authored-by: Patrick McCann <patmmccann@gmail.com> Co-authored-by: Neelanjan Sen <14229985+Fawke@users.noreply.github.com> Co-authored-by: Jaimin Panchal <email@example.com> Co-authored-by: Neelanjan Sen <neelanjan.sen@gmail.com> Co-authored-by: Chris Cole <goosemanjack@gmail.com> Co-authored-by: Isaac A. Dettman <idettman@rubiconproject.com> Co-authored-by: Scott <smenzer@gmail.com>
Type of change
Description of change
Add meta key to bid object after interpret response. Most of the bidders send meta data in bidResonse[bidderCode] field, so it copied to meta key now.
Be sure to test the integration with your adserver using the Hello World sample page.