Skip to content

Commit

Permalink
Merge branch 'prebid-4.0' of https://github.com/prebid/Prebid.js into…
Browse files Browse the repository at this point in the history
… prebid-4.0
  • Loading branch information
sumit sharma authored and sumit sharma committed Jun 24, 2020
2 parents 7078b84 + 8745985 commit 5750058
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions modules/pubmaticBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -985,6 +985,7 @@ export const spec = {
newBid.meta.buyerId = bid.ext.advid;
}
if (bid.adomain && bid.adomain.length > 0) {
newBid.meta.advertiserDomains = bid.adomain;
newBid.meta.clickUrl = bid.adomain[0];
}

Expand Down
5 changes: 5 additions & 0 deletions modules/spotxBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,11 @@ export const spec = {
height: spotxBid.h
};

bid.meta = bid.meta || {};
if (spotxBid && spotxBid.adomain && spotxBid.adomain.length > 0) {
bid.meta.advertiserDomains = spotxBid.adomain;
}

const context1 = utils.deepAccess(currentBidRequest, 'mediaTypes.video.context');
const context2 = utils.deepAccess(currentBidRequest, 'params.ad_unit');
if (context1 == 'outstream' || context2 == 'outstream') {
Expand Down
2 changes: 2 additions & 0 deletions test/spec/modules/pubmaticBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2343,6 +2343,7 @@ describe('PubMatic adapter', function () {
expect(response[0].adserverTargeting.hb_buyid_pubmatic).to.equal('BUYER-ID-987');
expect(response[0].meta.buyerId).to.equal(976);
expect(response[0].meta.clickUrl).to.equal('blackrock.com');
expect(response[0].meta.advertiserDomains[0]).to.equal('blackrock.com');
expect(response[0].referrer).to.include(data.site.ref);
expect(response[0].ad).to.equal(bidResponses.body.seatbid[0].bid[0].adm);
expect(response[0].pm_seat).to.equal(bidResponses.body.seatbid[0].seat);
Expand All @@ -2365,6 +2366,7 @@ describe('PubMatic adapter', function () {
expect(response[1].adserverTargeting.hb_buyid_pubmatic).to.equal('BUYER-ID-789');
expect(response[1].meta.buyerId).to.equal(832);
expect(response[1].meta.clickUrl).to.equal('hivehome.com');
expect(response[1].meta.advertiserDomains[0]).to.equal('hivehome.com');
expect(response[1].referrer).to.include(data.site.ref);
expect(response[1].ad).to.equal(bidResponses.body.seatbid[1].bid[0].adm);
expect(response[1].pm_seat).to.equal(bidResponses.body.seatbid[1].seat || null);
Expand Down
4 changes: 4 additions & 0 deletions test/spec/modules/spotxBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ describe('the spotx adapter', function () {
impid: 123,
cur: 'USD',
price: 12,
adomain: ['abc.com'],
crid: 321,
w: 400,
h: 300,
Expand All @@ -392,6 +393,7 @@ describe('the spotx adapter', function () {
impid: 124,
cur: 'USD',
price: 13,
adomain: ['def.com'],
w: 200,
h: 100,
ext: {
Expand All @@ -409,6 +411,7 @@ describe('the spotx adapter', function () {
expect(responses).to.be.an('array').with.length(2);
expect(responses[0].cache_key).to.equal('cache123');
expect(responses[0].channel_id).to.equal(12345);
expect(responses[0].meta.advertiserDomains[0]).to.equal('abc.com');
expect(responses[0].cpm).to.equal(12);
expect(responses[0].creativeId).to.equal(321);
expect(responses[0].currency).to.equal('USD');
Expand All @@ -423,6 +426,7 @@ describe('the spotx adapter', function () {
expect(responses[1].cache_key).to.equal('cache124');
expect(responses[1].channel_id).to.equal(12345);
expect(responses[1].cpm).to.equal(13);
expect(responses[1].meta.advertiserDomains[0]).to.equal('def.com');
expect(responses[1].creativeId).to.equal('');
expect(responses[1].currency).to.equal('USD');
expect(responses[1].height).to.equal(100);
Expand Down

0 comments on commit 5750058

Please sign in to comment.