Skip to content

Commit

Permalink
TheMediaGrid: support bid.ortb2.site.content.id (#8492)
Browse files Browse the repository at this point in the history
* Added TheMediaGridNM Bid Adapter

* Updated required params for TheMediaGridNM Bid Adapter

* Update TheMediGridNM Bid Adapter

* Fix tests for TheMediaGridNM Bid Adapter

* Fixes after review for TheMediaGridNM Bid Adapter

* Add support of multi-format in TheMediaGrid Bid Adapter

* Update sync url for grid and gridNM Bid Adapters

* TheMediaGrid Bid Adapter: added keywords adUnit parameter

* Update TheMediaGrid Bid Adapter to support keywords from config

* Implement new request format for TheMediaGrid Bid Adapter

* Fix jwpseg params for TheMediaGrid Bid Adapter

* Update unit tests for The Media Grid Bid Adapter

* Fix typo in TheMediaGrid Bid Adapter

* Added test for jwTargeting in TheMediaGrid Bid Adapter

* The new request format was made by default in TheMediaGrid Bid Adapter

* Update userId format in ad request for TheMediaGrid Bid Adapter

* Added bidFloor parameter for TheMediaGrid Bid Adapter

* Fix for review TheMediaGrid Bid Adapter

* Support floorModule in TheMediaGrid Bid Adapter

* Fix empty bidfloor for TheMediaGrid Bid Adapter

* Some change to restart autotests

* Fix userIds format for TheMediaGrid Bid Adapter

* Remove digitrust userId from TheMediaGrid Bid Adapter

* Protocols was added in video section in ad request for TheMediaGrid Bid Adapter

* TheMediaGrid: fix trouble with alias using

* TheMediaGridNM: fix trouble with alias

* TheMediaGrid Bid Adapter: added support of PBAdSlot module

* TheMediaGrid Bid Adapter: fix typo

* GridNM Bid Adapter: use absent in params data from mediaTypes

* GridNM Bid Adapter: fix md file + add advertiserDomains support

* TheMediaGrid and gridNM Bid Adapter: minor netRevenue fixes

* gridNM Bid Adapter updates after review

* TheMediaGrid Bid Adapter: fix keywords workflow

* fix testing and kick off lgtm again

* TheMediaGrid: added ext.bidder.grid.demandSource processing

* TheMediaGrid: added user.id from fpd cookie

* TheMediaGrid: control cookie setting via bidder config

* TheMediaGrid: use localStorage instead cookie

* TheMediaGridNM Bid Adapter: update adapter to use /hbjson endpoint

* TheMediaGridNM: fix unnecessary conditions

* TheMediaGrid: fix bug with nurl field in response

* TheMediaGrid: update test

* TheMediaGridNM: fix possible bug with nurl

* TheMediaGrid: added alias as playwire

* TheMediaGrid: added alias as adlivetech

* TheMediaGrid: fix sync url workflow

* TrustX: fix sync url worflow + remove old syncurl

* TheMediaGrid: added instl support

* TheMediaGrid: fix test for instl

* TheMediaGrid: update md file

* TheMediaGrid: reformat segments for permutive rtd module

* TrustX: send all ortb2.user.data in user.data

* TheMediaGrid: remove permutive segments reformating

* TrustX: remove permutive segments reformating

* TheMediaGrid & TrustX: fix typo

* TheMediaGrid: support bid.ortb2.site.content

* TheMediaGrid Bid Adapter: support bid.ortb2.site.content.id

Co-authored-by: Chris Huie <phoenixtechnerd@gmail.com>
  • Loading branch information
TheMediaGrid and ChrisHuie authored May 31, 2022
1 parent 5f2ed0f commit 5e44a1b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/gridBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,10 @@ export const spec = {
const siteContent = request.site.content || {};
request.site.content = mergeDeep(siteContent, { data });
}
const id = deepAccess(site, 'content.id');
if (id) {
request.site.content = {...request.site.content, id};
}
}

return {
Expand Down
11 changes: 11 additions & 0 deletions test/spec/modules/gridBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,17 @@ describe('TheMediaGrid Adapter', function () {
getConfigStub.restore();
});

it('should have site.content.id filled from config ortb2.site.content.id', function () {
const contentId = 'jw_abc';

const getConfigStub = sinon.stub(config, 'getConfig').callsFake(
arg => arg === 'ortb2.site' ? { content: { id: contentId } } : null);
const request = spec.buildRequests([bidRequests[0]], bidderRequest);
const payload = parseRequest(request.data);
expect(payload.site.content.id).to.equal(contentId);
getConfigStub.restore();
});

it('should be right tmax when timeout in config is less then timeout in bidderRequest', function() {
const getConfigStub = sinon.stub(config, 'getConfig').callsFake(
arg => arg === 'bidderTimeout' ? 2000 : null);
Expand Down

0 comments on commit 5e44a1b

Please sign in to comment.