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: support for Interstitial flag #8039

Merged
merged 96 commits into from
Feb 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 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
60be56b
Merge remote-tracking branch 'upstream/master'
TheMediaGrid Jul 14, 2021
2a66d3d
TheMediaGrid: added ext.bidder.grid.demandSource processing
TheMediaGrid Jul 14, 2021
7582d84
Merge remote-tracking branch 'upstream/master'
TheMediaGrid Aug 3, 2021
aba9510
TheMediaGrid: added user.id from fpd cookie
TheMediaGrid Aug 9, 2021
afa6dd6
Merge remote-tracking branch 'upstream/master'
TheMediaGrid Aug 9, 2021
8a0ef0c
Merge remote-tracking branch 'upstream/master'
TheMediaGrid Aug 31, 2021
10bd427
TheMediaGrid: control cookie setting via bidder config
TheMediaGrid Aug 31, 2021
199324d
TheMediaGrid: use localStorage instead cookie
TheMediaGrid Sep 2, 2021
0ed526d
Merge remote-tracking branch 'upstream/master'
TheMediaGrid Sep 2, 2021
578f571
Merge remote-tracking branch 'upstream/master'
TheMediaGrid Sep 9, 2021
b1147c8
Merge remote-tracking branch 'upstream/master'
TheMediaGrid Sep 16, 2021
54f0dc0
TheMediaGridNM Bid Adapter: update adapter to use /hbjson endpoint
TheMediaGrid Sep 16, 2021
6aa6ccb
Merge remote-tracking branch 'upstream/master'
TheMediaGrid Sep 17, 2021
88f2a71
TheMediaGridNM: fix unnecessary conditions
TheMediaGrid Sep 17, 2021
4ecc86a
Merge remote-tracking branch 'upstream/master' into HEAD
TheMediaGrid Sep 27, 2021
5e1b873
TheMediaGrid: fix bug with nurl field in response
TheMediaGrid Sep 27, 2021
9d99504
TheMediaGrid: update test
TheMediaGrid Sep 28, 2021
413aebe
Merge remote-tracking branch 'upstream/master'
TheMediaGrid Oct 4, 2021
930abad
TheMediaGridNM: fix possible bug with nurl
TheMediaGrid Oct 4, 2021
fb23fd9
Merge remote-tracking branch 'upstream/master'
TheMediaGrid Oct 19, 2021
fad42bb
TheMediaGrid: added alias as playwire
TheMediaGrid Oct 19, 2021
9f53ce7
Merge remote-tracking branch 'upstream/master'
TheMediaGrid Nov 1, 2021
56bc1a0
TheMediaGrid: added alias as adlivetech
TheMediaGrid Nov 1, 2021
0346f33
Merge remote-tracking branch 'upstream/master'
TheMediaGrid Dec 6, 2021
435be75
TheMediaGrid: fix sync url workflow
TheMediaGrid Dec 6, 2021
1c9b3bf
TrustX: fix sync url worflow + remove old syncurl
TheMediaGrid Dec 6, 2021
2c91a30
Merge remote-tracking branch 'upstream/master'
TheMediaGrid Feb 8, 2022
51f7cd5
TheMediaGrid: added instl support
TheMediaGrid Feb 8, 2022
627093c
TheMediaGrid: fix test for instl
TheMediaGrid Feb 15, 2022
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
17 changes: 11 additions & 6 deletions modules/gridBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,17 @@ export const spec = {
divid: adUnitCode.toString()
}
};
if (ortb2Imp && ortb2Imp.ext && ortb2Imp.ext.data) {
impObj.ext.data = ortb2Imp.ext.data;
if (impObj.ext.data.adserver && impObj.ext.data.adserver.adslot) {
impObj.ext.gpid = impObj.ext.data.adserver.adslot.toString();
} else {
impObj.ext.gpid = ortb2Imp.ext.data.pbadslot && ortb2Imp.ext.data.pbadslot.toString();
if (ortb2Imp) {
if (ortb2Imp.instl) {
impObj.instl = ortb2Imp.instl;
}
if (ortb2Imp.ext && ortb2Imp.ext.data) {
impObj.ext.data = ortb2Imp.ext.data;
if (impObj.ext.data.adserver && impObj.ext.data.adserver.adslot) {
impObj.ext.gpid = impObj.ext.data.adserver.adslot.toString();
} else {
impObj.ext.gpid = ortb2Imp.ext.data.pbadslot && ortb2Imp.ext.data.pbadslot.toString();
}
}
}
if (!isEmpty(keywords)) {
Expand Down
26 changes: 26 additions & 0 deletions test/spec/modules/gridBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,32 @@ describe('TheMediaGrid Adapter', function () {
});
});

it('should contain imp[].instl if available', function() {
const ortb2Imp = [{
instl: 1
}, {
instl: 2,
ext: {
data: {
adserver: {
name: 'ad_server_name',
adslot: '/222222/slot'
},
pbadslot: '/222222/slot'
}
}
}];
const bidRequestsWithOrtb2Imp = bidRequests.slice(0, 3).map((bid, ind) => {
return Object.assign(ortb2Imp[ind] ? { ortb2Imp: ortb2Imp[ind] } : {}, bid);
});
const request = spec.buildRequests(bidRequestsWithOrtb2Imp, bidderRequest);
expect(request.data).to.be.an('string');
const payload = parseRequest(request.data);
expect(payload.imp[0].instl).to.equal(1);
expect(payload.imp[1].instl).to.equal(2);
expect(payload.imp[2].instl).to.be.undefined;
});

it('all id must be a string', function() {
const fpdUserIdNumVal = 2345543345;
const getDataFromLocalStorageStub = sinon.stub(storage, 'getDataFromLocalStorage').callsFake(
Expand Down