Skip to content

Commit

Permalink
adding ccpa support for emx_digital adapter (prebid#4563)
Browse files Browse the repository at this point in the history
* adding ccpa support for emx_digital adapter

* emx_digital ccpa compliance: lint fix
  • Loading branch information
EMXDigital authored and tadam75 committed Jan 9, 2020
1 parent f308b6c commit e33a34c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/emx_digitalBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import includes from 'core-js/library/fn/array/includes';
const BIDDER_CODE = 'emx_digital';
const ENDPOINT = 'hb.emxdgt.com';
const RENDERER_URL = '//js.brealtime.com/outstream/1.30.0/bundle.js';
const ADAPTER_VERSION = '1.41.1';
const ADAPTER_VERSION = '1.41.2';
const DEFAULT_CUR = 'USD';

export const emxAdapter = {
Expand Down Expand Up @@ -230,6 +230,9 @@ export const spec = {
};

emxData = emxAdapter.getGdpr(bidRequest, Object.assign({}, emxData));
if (bidRequest && bidRequest.uspConsent) {
emxData.us_privacy = bidRequest.uspConsent
}
return {
method: 'POST',
url: url,
Expand Down
8 changes: 8 additions & 0 deletions test/spec/modules/emx_digitalBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,14 @@ describe('emx_digital Adapter', function () {
expect(request.regs.ext).to.have.property('gdpr', 0);
expect(request).to.not.have.property('user');
});
it('should add us privacy info to request', function() {
let consentString = '1YNN';
bidderRequest.uspConsent = consentString;
let request = spec.buildRequests(bidderRequest.bids, bidderRequest);
request = JSON.parse(request.data);
expect(request.us_privacy).to.exist;
expect(request.us_privacy).to.exist.and.to.equal(consentString);
});
});

describe('interpretResponse', function () {
Expand Down

0 comments on commit e33a34c

Please sign in to comment.