From 65975d3afa0f89c1f9fd7ccc2e77fc3251c2a333 Mon Sep 17 00:00:00 2001 From: Klaas-Jan Boon Date: Thu, 3 Jun 2021 12:19:16 +0200 Subject: [PATCH] Blue Billywig Adapter: add advertiserDomains support (#6927) * add Blue Billywig adapter * Blue Billywig Adapter - update according to review feedback * Blue Billywig Adapter - update to try and pass CircleCI * Remove the last for .. of in bluebillywigBidAdapter.js, hopefully... * Update bluebillywigBidAdapter test parameters to match renderer to rendererCode rename * Blue Billywig - Also pass through site config with OpenRTB request * add Blue Billywig adapter * Blue Billywig Adapter - update according to review feedback * Blue Billywig Adapter - update to try and pass CircleCI * Remove the last for .. of in bluebillywigBidAdapter.js, hopefully... * Code quality update, always hit user syncs, improved video params * Add support for meta.advertiserDomains to BB Adapter, addresses issue #6466 * kick off circleci tests Co-authored-by: Klaas-Jan Boon Co-authored-by: Chris Huie --- modules/bluebillywigBidAdapter.js | 5 +++-- package-lock.json | 2 +- test/spec/modules/bluebillywigBidAdapter_spec.js | 4 ++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/bluebillywigBidAdapter.js b/modules/bluebillywigBidAdapter.js index cac993b0f8c..3d4eeb058b3 100644 --- a/modules/bluebillywigBidAdapter.js +++ b/modules/bluebillywigBidAdapter.js @@ -8,7 +8,7 @@ import { createEidsArray } from './userId/eids.js'; const DEV_MODE = window.location.search.match(/bbpbs_debug=true/); -// Blue Billywig Constants +// Blue Billywig Constants const BB_CONSTANTS = { BIDDER_CODE: 'bluebillywig', AUCTION_URL: '$$URL_STARTpbs.bluebillywig.com/openrtb2/auction?pub=$$PUBLICATION', @@ -122,7 +122,8 @@ const BB_HELPERS = { if (!bidObject.vastUrl && bid.nurl && !bid.adm) { // ad markup is on win notice url, and adm is ommited according to OpenRTB 2.5 bidObject.vastUrl = bid.nurl; } - + bidObject.meta = bid.meta || {}; + if (bid.adomain) { bidObject.meta.advertiserDomains = bid.adomain; } return bidObject; }, }; diff --git a/package-lock.json b/package-lock.json index a6a58a530de..d59e11b038e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "prebid.js", - "version": "4.39.0-pre", + "version": "4.43.0-pre", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/test/spec/modules/bluebillywigBidAdapter_spec.js b/test/spec/modules/bluebillywigBidAdapter_spec.js index 3aee6c69438..c831ddf6ddf 100644 --- a/test/spec/modules/bluebillywigBidAdapter_spec.js +++ b/test/spec/modules/bluebillywigBidAdapter_spec.js @@ -760,6 +760,10 @@ describe('BlueBillywigAdapter', () => { expect(bid.currency).to.equal(serverResponse.body.cur); expect(bid.ttl).to.equal(BB_CONSTANTS.DEFAULT_TTL); + expect(bid).to.have.property('meta'); + expect(bid.meta).to.have.property('advertiserDomains'); + expect(bid.meta.advertiserDomains[0]).to.equal('bluebillywig.com'); + expect(bid.publicationName).to.equal(validBidderRequest.bids[0].params.publicationName); expect(bid.rendererCode).to.equal(validBidderRequest.bids[0].params.rendererCode); expect(bid.accountId).to.equal(validBidderRequest.bids[0].params.accountId);