Skip to content

Commit

Permalink
Sovrn and Sharethrough Bid Adapters: support for advertiserDomains (#…
Browse files Browse the repository at this point in the history
…6764)

* Update eids.js

* Update eids_spec.js

* Update eids.js

* Update pubmaticBidAdapter_spec.js

* Update eids.js

* Update eids_spec.js

* Update conversantBidAdapter_spec.js

* Update rubiconBidAdapter_spec.js

* Update conversantBidAdapter_spec.js

* Delete test/spec/adapters directory

* Update userId_spec.js

* Delete iasBidAdapter.js

* Add files via upload

* Update openxBidAdapter.js

* Update openxBidAdapter.js

* Update sovrnBidAdapter.js

* Update sharethroughBidAdapter.js

* Update sharethroughBidAdapter_spec.js

* Update sovrnBidAdapter_spec.js

* Update sovrnBidAdapter_spec.js

* Update sharethroughBidAdapter_spec.js

* Update sharethroughBidAdapter_spec.js

* Update sharethroughBidAdapter_spec.js
  • Loading branch information
patmmccann authored and idettman committed May 21, 2021
1 parent 8fb6899 commit 4bbcc18
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
1 change: 1 addition & 0 deletions modules/sharethroughBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ export const sharethroughAdapterSpec = {
currency: 'USD',
netRevenue: true,
ttl: 360,
meta: { advertiserDomains: creative.creative && creative.creative.adomain ? creative.creative.adomain : [] },
ad: generateAd(body, req)
}];
},
Expand Down
3 changes: 2 additions & 1 deletion modules/sovrnBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ export const spec = {
netRevenue: true,
mediaType: BANNER,
ad: decodeURIComponent(`${sovrnBid.adm}<img src="${sovrnBid.nurl}">`),
ttl: sovrnBid.ext ? (sovrnBid.ext.ttl || 90) : 90
ttl: sovrnBid.ext ? (sovrnBid.ext.ttl || 90) : 90,
meta: { advertiserDomains: sovrnBid && sovrnBid.adomain ? sovrnBid.adomain : [] }
});
});
}
Expand Down
5 changes: 3 additions & 2 deletions test/spec/modules/sharethroughBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ describe('sharethrough adapter spec', function() {

describe('.interpretResponse', function() {
it('returns a correctly parsed out response', function() {
expect(spec.interpretResponse(bidderResponse, prebidRequests[0])[0]).to.include(
expect(spec.interpretResponse(bidderResponse, prebidRequests[0])[0]).to.deep.include(
{
width: 1,
height: 1,
Expand All @@ -482,7 +482,8 @@ describe('sharethrough adapter spec', function() {
dealId: 'aDealId',
currency: 'USD',
netRevenue: true,
ttl: 360
ttl: 360,
meta: { advertiserDomains: [] }
});
});

Expand Down
12 changes: 8 additions & 4 deletions test/spec/modules/sovrnBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,8 @@ describe('sovrnBidAdapter', function() {
'netRevenue': true,
'mediaType': 'banner',
'ad': decodeURIComponent(`<!-- Creative --><img src=<!-- NURL -->>`),
'ttl': 60000
'ttl': 60000,
'meta': { advertiserDomains: [] }
}];

let result = spec.interpretResponse(response);
Expand All @@ -407,7 +408,8 @@ describe('sovrnBidAdapter', function() {
'netRevenue': true,
'mediaType': 'banner',
'ad': decodeURIComponent(`<!-- Creative --><img src="<!-- NURL -->">`),
'ttl': 90
'ttl': 90,
'meta': { advertiserDomains: [] }
}];

let result = spec.interpretResponse(response);
Expand All @@ -428,7 +430,8 @@ describe('sovrnBidAdapter', function() {
'netRevenue': true,
'mediaType': 'banner',
'ad': decodeURIComponent(`<!-- Creative --><img src="<!-- NURL -->">`),
'ttl': 90
'ttl': 90,
'meta': { advertiserDomains: [] }
}];

let result = spec.interpretResponse(response);
Expand All @@ -449,7 +452,8 @@ describe('sovrnBidAdapter', function() {
'netRevenue': true,
'mediaType': 'banner',
'ad': decodeURIComponent(`<!-- Creative --><img src="<!-- NURL -->">`),
'ttl': 480
'ttl': 480,
'meta': { advertiserDomains: [] }
}];

let result = spec.interpretResponse(response);
Expand Down

0 comments on commit 4bbcc18

Please sign in to comment.