From 577ef3387eae05941757c2a9dda1c1a9000c0faf Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Thu, 6 May 2021 13:47:00 -0400 Subject: [PATCH] Grid Bid Adapter: add support for advertiserDomains (#6716) * Update gridBidAdapter.js * Update gridBidAdapter_spec.js * Update gridBidAdapter_spec.js * Update gridBidAdapter_spec.js --- modules/gridBidAdapter.js | 3 +++ test/spec/modules/gridBidAdapter_spec.js | 30 ++++++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/modules/gridBidAdapter.js b/modules/gridBidAdapter.js index e7b42fc48e16..955aeff7168c 100644 --- a/modules/gridBidAdapter.js +++ b/modules/gridBidAdapter.js @@ -349,6 +349,9 @@ function _addBidResponse(serverBid, bidRequest, bidResponses) { currency: 'USD', netRevenue: false, ttl: TIME_TO_LIVE, + meta: { + advertiserDomains: serverBid && serverBid.adomain ? serverBid.adomain : [] + }, dealId: serverBid.dealid }; diff --git a/test/spec/modules/gridBidAdapter_spec.js b/test/spec/modules/gridBidAdapter_spec.js index f2e706145625..e161d82fdd64 100644 --- a/test/spec/modules/gridBidAdapter_spec.js +++ b/test/spec/modules/gridBidAdapter_spec.js @@ -557,6 +557,9 @@ describe('TheMediaGrid Adapter', function () { 'mediaType': 'banner', 'netRevenue': false, 'ttl': 360, + 'meta': { + advertiserDomains: [] + }, } ]; @@ -614,6 +617,9 @@ describe('TheMediaGrid Adapter', function () { 'mediaType': 'banner', 'netRevenue': false, 'ttl': 360, + 'meta': { + advertiserDomains: [] + }, }, { 'requestId': '4dff80cc4ee346', @@ -627,6 +633,9 @@ describe('TheMediaGrid Adapter', function () { 'mediaType': 'banner', 'netRevenue': false, 'ttl': 360, + 'meta': { + advertiserDomains: [] + }, }, { 'requestId': '5703af74d0472a', @@ -640,6 +649,9 @@ describe('TheMediaGrid Adapter', function () { 'mediaType': 'banner', 'netRevenue': false, 'ttl': 360, + 'meta': { + advertiserDomains: [] + }, } ]; @@ -699,6 +711,9 @@ describe('TheMediaGrid Adapter', function () { 'mediaType': 'video', 'netRevenue': false, 'ttl': 360, + 'meta': { + advertiserDomains: [] + }, 'vastXml': '\n<\/Ad>\n<\/VAST>', 'adResponse': { 'content': '\n<\/Ad>\n<\/VAST>' @@ -715,6 +730,9 @@ describe('TheMediaGrid Adapter', function () { 'mediaType': 'video', 'netRevenue': false, 'ttl': 360, + 'meta': { + advertiserDomains: [] + }, 'vastXml': '\n<\/Ad>\n<\/VAST>', 'adResponse': { 'content': '\n<\/Ad>\n<\/VAST>' @@ -846,6 +864,9 @@ describe('TheMediaGrid Adapter', function () { 'mediaType': 'banner', 'netRevenue': false, 'ttl': 360, + 'meta': { + advertiserDomains: [] + }, }, { 'requestId': '4e111f1b66e4', @@ -859,6 +880,9 @@ describe('TheMediaGrid Adapter', function () { 'mediaType': 'banner', 'netRevenue': false, 'ttl': 360, + 'meta': { + advertiserDomains: [] + }, }, { 'requestId': '26d6f897b516', @@ -872,6 +896,9 @@ describe('TheMediaGrid Adapter', function () { 'mediaType': 'banner', 'netRevenue': false, 'ttl': 360, + 'meta': { + advertiserDomains: [] + }, }, { 'requestId': '326bde7fbf69', @@ -885,6 +912,9 @@ describe('TheMediaGrid Adapter', function () { 'mediaType': 'banner', 'netRevenue': false, 'ttl': 360, + 'meta': { + advertiserDomains: [] + }, } ];