Skip to content

Commit

Permalink
Added US Privacy support in TrustX Bid Adapter (prebid#4529)
Browse files Browse the repository at this point in the history
* Add trustx adapter and tests for it

* update integration example

* Update trustx adapter

* Post-review fixes of Trustx adapter

* Code improvement for trustx adapter: changed default price type from gross to net

* Update TrustX adapter to support the 1.0 version

* Make requested changes for TrustX adapter

* Updated markdown file for TrustX adapter

* Fix TrustX adapter and spec file

* Update TrustX adapter: r parameter was added to ad request as cache buster

* Add support of gdpr to Trustx Bid Adapter

* Add wtimeout to ad request params for TrustX Bid Adapter

* TrustX Bid Adapter: remove last ampersand in the ad request

* Update TrustX Bid Adapter to support identical uids in parameters

* Update TrustX Bid Adapter to ignore bids that sizes do not match the size of the request

* Update TrustX Bid Adapter to support instream and outstream video

* Added wrapperType and wrapperVersion parameters in ad request for TrustX Bid Adapter

* Update TrustX Bid Adapter to use refererInfo instead depricated function utils.getTopWindowUrl

* HOTFIX for referrer encodind in TrustX Bid Adapter

* Fix test for TrustX Bid Adapter

* TrustX Bid Adapter: added keywords passing support

* TrustX Bid Adapter: added us_privacy parameter in bid request

* TrustX Bid Adapter: fix us_privacy parameter in bid request
  • Loading branch information
PWyrembak authored and tadam75 committed Jan 9, 2020
1 parent 6f8a648 commit fa4f0bf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/trustxBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ export const spec = {
(typeof bidderRequest.gdprConsent.gdprApplies === 'boolean')
? Number(bidderRequest.gdprConsent.gdprApplies) : 1;
}
if (bidderRequest.uspConsent) {
payload.us_privacy = bidderRequest.uspConsent;
}
}

return {
Expand Down
8 changes: 8 additions & 0 deletions test/spec/modules/trustxBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,14 @@ describe('TrustXAdapter', function () {
expect(payload).to.have.property('gdpr_applies', '1');
});

it('if usPrivacy is present payload must have us_privacy param', function () {
const bidderRequestWithUSP = Object.assign({uspConsent: '1YNN'}, bidderRequest);
const request = spec.buildRequests(bidRequests, bidderRequestWithUSP);
expect(request.data).to.be.an('string');
const payload = parseRequest(request.data);
expect(payload).to.have.property('us_privacy', '1YNN');
});

it('should convert keyword params to proper form and attaches to request', function () {
const bidRequestWithKeywords = [].concat(bidRequests);
bidRequestWithKeywords[1] = Object.assign({},
Expand Down

0 comments on commit fa4f0bf

Please sign in to comment.