Skip to content

Commit

Permalink
Grid Bid Adapter: add support for advertiserDomains (prebid#6716)
Browse files Browse the repository at this point in the history
* Update gridBidAdapter.js

* Update gridBidAdapter_spec.js

* Update gridBidAdapter_spec.js

* Update gridBidAdapter_spec.js
  • Loading branch information
patmmccann authored and umakajan committed May 6, 2021
1 parent e8a1425 commit 577ef33
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/gridBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
};

Expand Down
30 changes: 30 additions & 0 deletions test/spec/modules/gridBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,9 @@ describe('TheMediaGrid Adapter', function () {
'mediaType': 'banner',
'netRevenue': false,
'ttl': 360,
'meta': {
advertiserDomains: []
},
}
];

Expand Down Expand Up @@ -614,6 +617,9 @@ describe('TheMediaGrid Adapter', function () {
'mediaType': 'banner',
'netRevenue': false,
'ttl': 360,
'meta': {
advertiserDomains: []
},
},
{
'requestId': '4dff80cc4ee346',
Expand All @@ -627,6 +633,9 @@ describe('TheMediaGrid Adapter', function () {
'mediaType': 'banner',
'netRevenue': false,
'ttl': 360,
'meta': {
advertiserDomains: []
},
},
{
'requestId': '5703af74d0472a',
Expand All @@ -640,6 +649,9 @@ describe('TheMediaGrid Adapter', function () {
'mediaType': 'banner',
'netRevenue': false,
'ttl': 360,
'meta': {
advertiserDomains: []
},
}
];

Expand Down Expand Up @@ -699,6 +711,9 @@ describe('TheMediaGrid Adapter', function () {
'mediaType': 'video',
'netRevenue': false,
'ttl': 360,
'meta': {
advertiserDomains: []
},
'vastXml': '<VAST version=\"3.0\">\n<Ad id=\"21341234\"><\/Ad>\n<\/VAST>',
'adResponse': {
'content': '<VAST version=\"3.0\">\n<Ad id=\"21341234\"><\/Ad>\n<\/VAST>'
Expand All @@ -715,6 +730,9 @@ describe('TheMediaGrid Adapter', function () {
'mediaType': 'video',
'netRevenue': false,
'ttl': 360,
'meta': {
advertiserDomains: []
},
'vastXml': '<VAST version=\"3.0\">\n<Ad id=\"21331274\"><\/Ad>\n<\/VAST>',
'adResponse': {
'content': '<VAST version=\"3.0\">\n<Ad id=\"21331274\"><\/Ad>\n<\/VAST>'
Expand Down Expand Up @@ -846,6 +864,9 @@ describe('TheMediaGrid Adapter', function () {
'mediaType': 'banner',
'netRevenue': false,
'ttl': 360,
'meta': {
advertiserDomains: []
},
},
{
'requestId': '4e111f1b66e4',
Expand All @@ -859,6 +880,9 @@ describe('TheMediaGrid Adapter', function () {
'mediaType': 'banner',
'netRevenue': false,
'ttl': 360,
'meta': {
advertiserDomains: []
},
},
{
'requestId': '26d6f897b516',
Expand All @@ -872,6 +896,9 @@ describe('TheMediaGrid Adapter', function () {
'mediaType': 'banner',
'netRevenue': false,
'ttl': 360,
'meta': {
advertiserDomains: []
},
},
{
'requestId': '326bde7fbf69',
Expand All @@ -885,6 +912,9 @@ describe('TheMediaGrid Adapter', function () {
'mediaType': 'banner',
'netRevenue': false,
'ttl': 360,
'meta': {
advertiserDomains: []
},
}
];

Expand Down

0 comments on commit 577ef33

Please sign in to comment.