diff --git a/modules/openxBidAdapter.js b/modules/openxBidAdapter.js index 6a79681484e..952e706ef7d 100644 --- a/modules/openxBidAdapter.js +++ b/modules/openxBidAdapter.js @@ -8,7 +8,7 @@ import {parse} from 'src/url'; const SUPPORTED_AD_TYPES = [BANNER, VIDEO]; const BIDDER_CODE = 'openx'; const BIDDER_CONFIG = 'hb_pb'; -const BIDDER_VERSION = '2.1.3'; +const BIDDER_VERSION = '2.1.4'; let shouldSendBoPixel = true; @@ -201,6 +201,7 @@ function buildCommonQueryParamsFromBids(bids, bidderRequest) { tz: new Date().getTimezoneOffset(), tws: getViewportDimensions(isInIframe), be: 1, + bc: bids[0].params.bc || `${BIDDER_CONFIG}_${BIDDER_VERSION}`, dddid: utils._map(bids, bid => bid.transactionId).join(','), nocache: new Date().getTime() }; @@ -230,7 +231,6 @@ function buildOXBannerRequest(bids, bidderRequest) { let queryParams = buildCommonQueryParamsFromBids(bids, bidderRequest); let auids = utils._map(bids, bid => bid.params.unit); queryParams.aus = utils._map(bids, bid => utils.parseSizesInput(bid.sizes).join(',')).join('|'); - queryParams.bc = bids[0].params.bc || `${BIDDER_CONFIG}_${BIDDER_VERSION}`; queryParams.divIds = utils._map(bids, bid => encodeURIComponent(bid.adUnitCode)).join(','); if (auids.some(auid => auid)) { diff --git a/test/spec/modules/openxBidAdapter_spec.js b/test/spec/modules/openxBidAdapter_spec.js index c0588f2eff0..324f9d80ae4 100644 --- a/test/spec/modules/openxBidAdapter_spec.js +++ b/test/spec/modules/openxBidAdapter_spec.js @@ -839,6 +839,13 @@ describe('OpenxAdapter', () => { expect(dataParams.vwd).to.equal(640); }); + it('should send a bc parameter', () => { + const request = spec.buildRequests(bidRequestsWithMediaTypes); + const dataParams = request[0].data; + + expect(dataParams.bc).to.have.string('hb_pb'); + }); + describe('when using the video param', function () { let videoBidRequest;