Skip to content

Commit

Permalink
Add brand ID to OpenX bid responses (prebid#3630)
Browse files Browse the repository at this point in the history
  • Loading branch information
kelvin-chappell authored and jacekburys-quantcast committed May 15, 2019
1 parent a0ee81a commit c187c11
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions modules/openxBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ function createBannerBidResponses(oxResponseObj, {bids, startTime}) {
}
bidResponse.ts = adUnit.ts;

bidResponse.meta = {};
if (adUnit.brand_id) {
bidResponse.meta.brandId = adUnit.brand_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 @@ -1190,6 +1190,10 @@ describe('OpenxAdapter', function () {
expect(bid.ts).to.equal(adUnitOverride.ts);
});

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

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

0 comments on commit c187c11

Please sign in to comment.