Skip to content
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

[BID-3479] - Add BidResponse.meta.dspid for OpenX #3895

Merged
merged 2 commits into from
Jun 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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