Skip to content

Commit

Permalink
Update Adtelligent, Adtarget, ViewDeos adapters to support adomain (#…
Browse files Browse the repository at this point in the history
…6917)

* Update Adtelligent, Adtarget, ViewDeos   adapters to support adomain

* fix

* fix tests
  • Loading branch information
GeneGenie authored Jun 2, 2021
1 parent db50c5b commit b271db1
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 16 deletions.
5 changes: 4 additions & 1 deletion modules/adtargetBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,10 @@ function createBid(bidResponse, bidRequest) {
cpm: bidResponse.cpm,
netRevenue: true,
mediaType,
ttl: 300
ttl: 300,
meta: {
advertiserDomains: bidResponse.adomain || []
}
};

if (mediaType === BANNER) {
Expand Down
5 changes: 4 additions & 1 deletion modules/adtelligentBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,10 @@ function createBid(bidResponse, bidRequest) {
cpm: bidResponse.cpm,
netRevenue: true,
mediaType,
ttl: 300
ttl: 300,
meta: {
advertiserDomains: bidResponse.adomain || []
}
};

if (mediaType === BANNER) {
Expand Down
5 changes: 4 additions & 1 deletion modules/viewdeosDXBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,10 @@ function createBid(bidResponse, mediaType, bidderParams) {
cpm: bidResponse.cpm,
netRevenue: true,
mediaType,
ttl: 3600
ttl: 3600,
meta: {
advertiserDomains: bidResponse.adomain || []
}
};

if (mediaType === DISPLAY) {
Expand Down
13 changes: 10 additions & 3 deletions test/spec/modules/adtargetBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ const SERVER_VIDEO_RESPONSE = {
'height': 480,
'cur': 'USD',
'width': 640,
'cpm': 0.9
'cpm': 0.9,
'adomain': ['a.com']
}]
};
const SERVER_DISPLAY_RESPONSE = {
Expand Down Expand Up @@ -107,7 +108,10 @@ const videoEqResponse = [{
height: 480,
width: 640,
ttl: 300,
cpm: 0.9
cpm: 0.9,
meta: {
advertiserDomains: ['a.com']
}
}];

const displayEqResponse = [{
Expand All @@ -120,7 +124,10 @@ const displayEqResponse = [{
height: 250,
width: 300,
ttl: 300,
cpm: 0.9
cpm: 0.9,
meta: {
advertiserDomains: []
}
}];

describe('adtargetBidAdapter', () => {
Expand Down
17 changes: 12 additions & 5 deletions test/spec/modules/adtelligentBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ const SERVER_VIDEO_RESPONSE = {
'height': 480,
'cur': 'USD',
'width': 640,
'cpm': 0.9
}
]
'cpm': 0.9,
'adomain': ['a.com']
}]
};
const SERVER_OUSTREAM_VIDEO_RESPONSE = SERVER_VIDEO_RESPONSE;
const SERVER_DISPLAY_RESPONSE = {
Expand Down Expand Up @@ -163,7 +163,10 @@ const videoEqResponse = [{
height: 480,
width: 640,
ttl: 300,
cpm: 0.9
cpm: 0.9,
meta: {
advertiserDomains: ['a.com']
}
}];

const displayEqResponse = [{
Expand All @@ -177,7 +180,11 @@ const displayEqResponse = [{
height: 250,
width: 300,
ttl: 300,
cpm: 0.9
cpm: 0.9,
meta: {
advertiserDomains: []
}

}];

describe('adtelligentBidAdapter', () => {
Expand Down
16 changes: 11 additions & 5 deletions test/spec/modules/viewdeosDXBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ const SERVER_VIDEO_RESPONSE = {
'height': 480,
'cur': 'USD',
'width': 640,
'cpm': 0.9
}
]
'cpm': 0.9,
'adomain': ['a.com']
}]
};
const SERVER_OUSTREAM_VIDEO_RESPONSE = SERVER_VIDEO_RESPONSE;

Expand Down Expand Up @@ -123,7 +123,10 @@ const videoEqResponse = [{
height: 480,
width: 640,
ttl: 3600,
cpm: 0.9
cpm: 0.9,
meta: {
advertiserDomains: ['a.com']
}
}];

const displayEqResponse = [{
Expand All @@ -136,7 +139,10 @@ const displayEqResponse = [{
height: 250,
width: 300,
ttl: 3600,
cpm: 0.9
cpm: 0.9,
meta: {
advertiserDomains: []
}
}];

describe('viewdeosDXBidAdapter', function () {
Expand Down

0 comments on commit b271db1

Please sign in to comment.