Skip to content

Commit

Permalink
[BID-3479] - Add BidResponse.meta.dspid for OpenX (prebid#3895)
Browse files Browse the repository at this point in the history
* [BID-3479] - Add BidResponse.meta.dspid for OpenX

* Update version number to 2.1.7
  • Loading branch information
lambdarho authored and sa1omon committed Nov 28, 2019
1 parent 046a19c commit 2deb3be
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion modules/openxBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.6';
const BIDDER_VERSION = '2.1.7';

let shouldSendBoPixel = true;

Expand Down Expand Up @@ -121,6 +121,10 @@ function createBannerBidResponses(oxResponseObj, {bids, startTime}) {
bidResponse.meta.brandId = adUnit.brand_id;
}

if (adUnit.adv_id) {
bidResponse.meta.dspid = adUnit.adv_id;
}

bidResponses.push(bidResponse);

registerBeacon(BANNER, adUnit, startTime);
Expand Down
4 changes: 4 additions & 0 deletions test/spec/modules/openxBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1218,6 +1218,10 @@ describe('OpenxAdapter', function () {
expect(bid.meta.brandId).to.equal(DEFAULT_TEST_ARJ_AD_UNIT.brand_id);
});

it('should return a brand ID', function () {
expect(bid.meta.dspid).to.equal(DEFAULT_TEST_ARJ_AD_UNIT.adv_id);
});

it('should register a beacon', function () {
resetBoPixel();
spec.interpretResponse({body: bidResponse}, bidRequest);
Expand Down

0 comments on commit 2deb3be

Please sign in to comment.