From dcb9f224f66d2d9bfa041b25c6805fb768e230ef Mon Sep 17 00:00:00 2001 From: moroz Date: Wed, 2 Jun 2021 14:12:53 +0300 Subject: [PATCH 1/3] Update Adtelligent, Adtarget, ViewDeos adapters to support adomain --- modules/adtargetBidAdapter.js | 5 ++++- modules/adtelligentBidAdapter.js | 5 ++++- modules/viewdeosDXBidAdapter.js | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/modules/adtargetBidAdapter.js b/modules/adtargetBidAdapter.js index b22addec54f..63c933fa87b 100644 --- a/modules/adtargetBidAdapter.js +++ b/modules/adtargetBidAdapter.js @@ -173,7 +173,10 @@ function createBid(bidResponse, bidRequest) { cpm: bidResponse.cpm, netRevenue: true, mediaType, - ttl: 300 + ttl: 300, + meta: { + advertiserDomains: bid && bid.adomain ? bid.adomain : [] + } }; if (mediaType === BANNER) { diff --git a/modules/adtelligentBidAdapter.js b/modules/adtelligentBidAdapter.js index 9ca4b95dfd2..93b9c290a68 100644 --- a/modules/adtelligentBidAdapter.js +++ b/modules/adtelligentBidAdapter.js @@ -248,7 +248,10 @@ function createBid(bidResponse, bidRequest) { cpm: bidResponse.cpm, netRevenue: true, mediaType, - ttl: 300 + ttl: 300, + meta: { + advertiserDomains: bid && bid.adomain ? bid.adomain : [] + } }; if (mediaType === BANNER) { diff --git a/modules/viewdeosDXBidAdapter.js b/modules/viewdeosDXBidAdapter.js index 22c16ab5b34..e28f68e4428 100644 --- a/modules/viewdeosDXBidAdapter.js +++ b/modules/viewdeosDXBidAdapter.js @@ -190,7 +190,10 @@ function createBid(bidResponse, mediaType, bidderParams) { cpm: bidResponse.cpm, netRevenue: true, mediaType, - ttl: 3600 + ttl: 3600, + meta: { + advertiserDomains: bid && bid.adomain ? bid.adomain : [] + } }; if (mediaType === DISPLAY) { From 318793a65ca60ccb9a323a6bb9a8bfb5231429cd Mon Sep 17 00:00:00 2001 From: moroz Date: Wed, 2 Jun 2021 15:00:24 +0300 Subject: [PATCH 2/3] fix --- modules/adtargetBidAdapter.js | 2 +- modules/adtelligentBidAdapter.js | 2 +- modules/viewdeosDXBidAdapter.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/adtargetBidAdapter.js b/modules/adtargetBidAdapter.js index 63c933fa87b..1779ba94371 100644 --- a/modules/adtargetBidAdapter.js +++ b/modules/adtargetBidAdapter.js @@ -175,7 +175,7 @@ function createBid(bidResponse, bidRequest) { mediaType, ttl: 300, meta: { - advertiserDomains: bid && bid.adomain ? bid.adomain : [] + advertiserDomains: bidResponse.adomain || [] } }; diff --git a/modules/adtelligentBidAdapter.js b/modules/adtelligentBidAdapter.js index 93b9c290a68..d21931a6dcb 100644 --- a/modules/adtelligentBidAdapter.js +++ b/modules/adtelligentBidAdapter.js @@ -250,7 +250,7 @@ function createBid(bidResponse, bidRequest) { mediaType, ttl: 300, meta: { - advertiserDomains: bid && bid.adomain ? bid.adomain : [] + advertiserDomains: bidResponse.adomain || [] } }; diff --git a/modules/viewdeosDXBidAdapter.js b/modules/viewdeosDXBidAdapter.js index e28f68e4428..212759642f5 100644 --- a/modules/viewdeosDXBidAdapter.js +++ b/modules/viewdeosDXBidAdapter.js @@ -192,7 +192,7 @@ function createBid(bidResponse, mediaType, bidderParams) { mediaType, ttl: 3600, meta: { - advertiserDomains: bid && bid.adomain ? bid.adomain : [] + advertiserDomains: bidResponse.adomain || [] } }; From 7065d77b67e6898b0827b17a543078562c83669d Mon Sep 17 00:00:00 2001 From: moroz Date: Wed, 2 Jun 2021 17:38:15 +0300 Subject: [PATCH 3/3] fix tests --- test/spec/modules/adtargetBidAdapter_spec.js | 13 ++++++++++--- test/spec/modules/adtelligentBidAdapter_spec.js | 17 ++++++++++++----- test/spec/modules/viewdeosDXBidAdapter_spec.js | 16 +++++++++++----- 3 files changed, 33 insertions(+), 13 deletions(-) diff --git a/test/spec/modules/adtargetBidAdapter_spec.js b/test/spec/modules/adtargetBidAdapter_spec.js index 5a867e7dd52..d1221d24022 100644 --- a/test/spec/modules/adtargetBidAdapter_spec.js +++ b/test/spec/modules/adtargetBidAdapter_spec.js @@ -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 = { @@ -107,7 +108,10 @@ const videoEqResponse = [{ height: 480, width: 640, ttl: 300, - cpm: 0.9 + cpm: 0.9, + meta: { + advertiserDomains: ['a.com'] + } }]; const displayEqResponse = [{ @@ -120,7 +124,10 @@ const displayEqResponse = [{ height: 250, width: 300, ttl: 300, - cpm: 0.9 + cpm: 0.9, + meta: { + advertiserDomains: [] + } }]; describe('adtargetBidAdapter', () => { diff --git a/test/spec/modules/adtelligentBidAdapter_spec.js b/test/spec/modules/adtelligentBidAdapter_spec.js index e6916997133..4cfb367efb3 100644 --- a/test/spec/modules/adtelligentBidAdapter_spec.js +++ b/test/spec/modules/adtelligentBidAdapter_spec.js @@ -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 = { @@ -163,7 +163,10 @@ const videoEqResponse = [{ height: 480, width: 640, ttl: 300, - cpm: 0.9 + cpm: 0.9, + meta: { + advertiserDomains: ['a.com'] + } }]; const displayEqResponse = [{ @@ -177,7 +180,11 @@ const displayEqResponse = [{ height: 250, width: 300, ttl: 300, - cpm: 0.9 + cpm: 0.9, + meta: { + advertiserDomains: [] + } + }]; describe('adtelligentBidAdapter', () => { diff --git a/test/spec/modules/viewdeosDXBidAdapter_spec.js b/test/spec/modules/viewdeosDXBidAdapter_spec.js index f9bee1b0efe..31df9244ada 100644 --- a/test/spec/modules/viewdeosDXBidAdapter_spec.js +++ b/test/spec/modules/viewdeosDXBidAdapter_spec.js @@ -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; @@ -123,7 +123,10 @@ const videoEqResponse = [{ height: 480, width: 640, ttl: 3600, - cpm: 0.9 + cpm: 0.9, + meta: { + advertiserDomains: ['a.com'] + } }]; const displayEqResponse = [{ @@ -136,7 +139,10 @@ const displayEqResponse = [{ height: 250, width: 300, ttl: 3600, - cpm: 0.9 + cpm: 0.9, + meta: { + advertiserDomains: [] + } }]; describe('viewdeosDXBidAdapter', function () {