Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grid Bid Adapter: add support for advertiserDomains #6716

Merged
merged 4 commits into from
May 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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