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

TheMediaGrid Bid Adapter: Added support of nurl in the response #7384

Merged
merged 69 commits into from
Sep 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
94d2b3a
Added TheMediaGridNM Bid Adapter
TheMediaGrid Mar 12, 2020
3ba8fd8
Updated required params for TheMediaGridNM Bid Adapter
TheMediaGrid Mar 12, 2020
b830678
Update TheMediGridNM Bid Adapter
TheMediaGrid Mar 17, 2020
9675d02
Fix tests for TheMediaGridNM Bid Adapter
TheMediaGrid Mar 17, 2020
65cb00f
Merge remote-tracking branch 'upstream/master'
TheMediaGrid Mar 17, 2020
f1cba4a
Merge remote-tracking branch 'upstream/master'
TheMediaGrid Mar 31, 2020
52e593c
Fixes after review for TheMediaGridNM Bid Adapter
TheMediaGrid Mar 31, 2020
7b99287
Merge remote-tracking branch 'upstream/master'
TheMediaGrid May 12, 2020
83fb2b4
Add support of multi-format in TheMediaGrid Bid Adapter
TheMediaGrid May 12, 2020
926f4d9
Merge remote-tracking branch 'upstream/master'
TheMediaGrid May 26, 2020
66f2ac8
Update sync url for grid and gridNM Bid Adapters
TheMediaGrid May 26, 2020
b2fb704
Merge remote-tracking branch 'upstream/master'
TheMediaGrid Jun 9, 2020
4fcf522
TheMediaGrid Bid Adapter: added keywords adUnit parameter
TheMediaGrid Jun 9, 2020
6906f1b
Merge remote-tracking branch 'upstream/master'
TheMediaGrid Jun 15, 2020
bfe4f5e
Update TheMediaGrid Bid Adapter to support keywords from config
TheMediaGrid Jun 15, 2020
d2c199b
Merge remote-tracking branch 'upstream/master'
TheMediaGrid Jul 4, 2020
64b5b8d
Implement new request format for TheMediaGrid Bid Adapter
TheMediaGrid Jul 10, 2020
ef493f7
Merge remote-tracking branch 'upstream/master'
TheMediaGrid Jul 23, 2020
4481d01
Merge remote-tracking branch 'upstream/master'
TheMediaGrid Jul 27, 2020
faa9bfb
Fix jwpseg params for TheMediaGrid Bid Adapter
TheMediaGrid Jul 27, 2020
dc645c7
Update unit tests for The Media Grid Bid Adapter
TheMediaGrid Jul 29, 2020
340cae4
Fix typo in TheMediaGrid Bid Adapter
TheMediaGrid Aug 10, 2020
6fa4e21
Merge remote-tracking branch 'upstream/master'
TheMediaGrid Aug 10, 2020
250601e
Merge remote-tracking branch 'upstream/master'
TheMediaGrid Sep 2, 2020
a4904d6
Added test for jwTargeting in TheMediaGrid Bid Adapter
TheMediaGrid Sep 3, 2020
dfef5e1
Merge remote-tracking branch 'upstream/master'
TheMediaGrid Oct 7, 2020
1644021
The new request format was made by default in TheMediaGrid Bid Adapter
TheMediaGrid Oct 8, 2020
54237d7
Update userId format in ad request for TheMediaGrid Bid Adapter
TheMediaGrid Oct 12, 2020
a8c7096
Added bidFloor parameter for TheMediaGrid Bid Adapter
TheMediaGrid Oct 14, 2020
e9fb25d
Fix for review TheMediaGrid Bid Adapter
TheMediaGrid Oct 20, 2020
9039a79
Support floorModule in TheMediaGrid Bid Adapter
TheMediaGrid Oct 20, 2020
07a13b2
Merge remote-tracking branch 'upstream/master'
TheMediaGrid Oct 21, 2020
aea2b2e
Merge remote-tracking branch 'upstream/master'
TheMediaGrid Nov 25, 2020
2347817
Fix empty bidfloor for TheMediaGrid Bid Adapter
TheMediaGrid Nov 25, 2020
a7c3733
Some change to restart autotests
TheMediaGrid Nov 30, 2020
0763615
Merge remote-tracking branch 'upstream/master'
TheMediaGrid Nov 30, 2020
81c6700
Merge remote-tracking branch 'upstream/master'
TheMediaGrid Dec 17, 2020
77ce199
Fix userIds format for TheMediaGrid Bid Adapter
TheMediaGrid Dec 18, 2020
4b944e8
Remove digitrust userId from TheMediaGrid Bid Adapter
TheMediaGrid Dec 21, 2020
192cb9a
Merge remote-tracking branch 'upstream/master'
TheMediaGrid Feb 10, 2021
e7994ca
Merge remote-tracking branch 'upstream/master'
TheMediaGrid Feb 11, 2021
01e4c8e
Protocols was added in video section in ad request for TheMediaGrid B…
TheMediaGrid Feb 11, 2021
a2c90fb
Merge remote-tracking branch 'upstream/master'
TheMediaGrid Feb 26, 2021
97e1c5e
TheMediaGrid: fix trouble with alias using
TheMediaGrid Feb 26, 2021
ae34924
Merge remote-tracking branch 'upstream/master'
TheMediaGrid Mar 1, 2021
21cad2b
TheMediaGridNM: fix trouble with alias
TheMediaGrid Mar 1, 2021
0cf3d1d
Merge remote-tracking branch 'upstream/master'
TheMediaGrid Mar 10, 2021
94fccff
Merge remote-tracking branch 'upstream/master'
TheMediaGrid Apr 12, 2021
ecfa441
Merge remote-tracking branch 'upstream/master'
TheMediaGrid Apr 14, 2021
ebf5684
Merge remote-tracking branch 'upstream/master'
TheMediaGrid Apr 16, 2021
da4e7a3
TheMediaGrid Bid Adapter: added support of PBAdSlot module
TheMediaGrid Apr 16, 2021
419fd89
TheMediaGrid Bid Adapter: fix typo
TheMediaGrid Apr 21, 2021
7845ee4
Merge remote-tracking branch 'upstream/master'
TheMediaGrid Apr 26, 2021
8036bfa
Merge remote-tracking branch 'upstream/master'
TheMediaGrid Apr 26, 2021
3e9b878
Merge remote-tracking branch 'upstream/master'
TheMediaGrid Apr 27, 2021
2645aff
Merge remote-tracking branch 'upstream/master'
TheMediaGrid May 20, 2021
d76839f
GridNM Bid Adapter: use absent in params data from mediaTypes
TheMediaGrid May 24, 2021
126b9af
GridNM Bid Adapter: fix md file + add advertiserDomains support
TheMediaGrid May 24, 2021
5ae8585
Merge remote-tracking branch 'upstream/master'
TheMediaGrid May 31, 2021
3504295
TheMediaGrid and gridNM Bid Adapter: minor netRevenue fixes
TheMediaGrid May 31, 2021
271b24c
gridNM Bid Adapter updates after review
TheMediaGrid Jun 2, 2021
635b87c
Merge remote-tracking branch 'upstream/master'
TheMediaGrid Jul 1, 2021
e299874
TheMediaGrid Bid Adapter: fix keywords workflow
TheMediaGrid Jul 1, 2021
6503708
Merge remote-tracking branch 'upstream/master'
TheMediaGrid Jul 2, 2021
dc7263e
fix testing and kick off lgtm again
ChrisHuie Jul 6, 2021
f5b0acc
Merge remote-tracking branch 'upstream/master'
TheMediaGrid Jul 11, 2021
4452dff
TheMediaGrig: added keywords formating in request
TheMediaGrid Jul 11, 2021
d16e2ec
Merge remote-tracking branch 'upstream/master' into nurl_support
TheMediaGrid Sep 7, 2021
0631d97
TheMediaGrid: added support nurl field in ad response
TheMediaGrid Sep 7, 2021
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
15 changes: 10 additions & 5 deletions modules/gridBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ function _addBidResponse(serverBid, bidRequest, bidResponses) {
if (!serverBid) return;
let errorMessage;
if (!serverBid.auid) errorMessage = LOG_ERROR_MESS.noAuid + JSON.stringify(serverBid);
if (!serverBid.adm) errorMessage = LOG_ERROR_MESS.noAdm + JSON.stringify(serverBid);
if (!errorMessage && !serverBid.adm && !serverBid.nurl) errorMessage = LOG_ERROR_MESS.noAdm + JSON.stringify(serverBid);
else {
const bid = bidRequest.bidsMap[serverBid.impid];
if (bid) {
Expand All @@ -368,11 +368,16 @@ function _addBidResponse(serverBid, bidRequest, bidResponses) {
}

if (serverBid.content_type === 'video') {
bidResponse.vastXml = serverBid.adm;
if (serverBid.adm) {
bidResponse.vastXml = serverBid.adm;
bidResponse.adResponse = {
content: bidResponse.vastXml
};
}
if (serverBid.nurl) {
bidResponse.vastUrl = serverBid.nurl;
}
bidResponse.mediaType = VIDEO;
bidResponse.adResponse = {
content: bidResponse.vastXml
};
if (!bid.renderer && (!bid.mediaTypes || !bid.mediaTypes.video || bid.mediaTypes.video.context === 'outstream')) {
bidResponse.renderer = createRenderer(bidResponse, {
id: bid.bidId,
Expand Down
52 changes: 51 additions & 1 deletion test/spec/modules/gridBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -756,11 +756,45 @@ describe('TheMediaGrid Adapter', function () {
'context': 'instream'
}
}
},
{
'bidder': 'grid',
'params': {
'uid': '13'
},
'adUnitCode': 'adunit-code-2',
'sizes': [[300, 250], [300, 600]],
'bidId': '23312a43bc42',
'bidderRequestId': '5f2009617a7c0a',
'auctionId': '1cbd2feafe5e8b',
'mediaTypes': {
'video': {
'context': 'instream'
}
}
},
{
'bidder': 'grid',
'params': {
'uid': '14'
},
'adUnitCode': 'adunit-code-2',
'sizes': [[300, 250], [300, 600]],
'bidId': 'a74b342f8cd',
'bidderRequestId': '5f2009617a7c0a',
'auctionId': '1cbd2feafe5e8b',
'mediaTypes': {
'video': {
'context': 'instream'
}
}
}
];
const response = [
{'bid': [{'impid': '659423fff799cb', 'price': 1.15, 'adm': '<VAST version=\"3.0\">\n<Ad id=\"21341234\"><\/Ad>\n<\/VAST>', 'auid': 11, content_type: 'video', w: 300, h: 600}], 'seat': '2'},
{'bid': [{'impid': '2bc598e42b6a', 'price': 1.00, 'adm': '<VAST version=\"3.0\">\n<Ad id=\"21331274\"><\/Ad>\n<\/VAST>', 'auid': 12, content_type: 'video'}], 'seat': '2'}
{'bid': [{'impid': '2bc598e42b6a', 'price': 1.00, 'adm': '<VAST version=\"3.0\">\n<Ad id=\"21331274\"><\/Ad>\n<\/VAST>', 'auid': 12, content_type: 'video'}], 'seat': '2'},
{'bid': [{'impid': '23312a43bc42', 'price': 2.00, 'nurl': 'https://some_test_vast_url.com', 'auid': 13, content_type: 'video', 'adomain': ['example.com'], w: 300, h: 600}], 'seat': '2'},
{'bid': [{'impid': 'a74b342f8cd', 'price': 1.50, 'nurl': '', 'auid': 14, content_type: 'video'}], 'seat': '2'}
];
const request = spec.buildRequests(bidRequests);
const expectedResponse = [
Expand Down Expand Up @@ -801,6 +835,22 @@ describe('TheMediaGrid Adapter', function () {
'adResponse': {
'content': '<VAST version=\"3.0\">\n<Ad id=\"21331274\"><\/Ad>\n<\/VAST>'
}
},
{
'requestId': '23312a43bc42',
'cpm': 2.00,
'creativeId': 13,
'dealId': undefined,
'width': 300,
'height': 600,
'currency': 'USD',
'mediaType': 'video',
'netRevenue': true,
'ttl': 360,
'meta': {
advertiserDomains: ['example.com']
},
'vastUrl': 'https://some_test_vast_url.com',
}
];

Expand Down