Skip to content

Commit

Permalink
Merge pull request #11 from yieldmo/FS-7901-us-privacy
Browse files Browse the repository at this point in the history
Pass along us_privacy string
  • Loading branch information
Elber Carneiro authored Nov 27, 2019
2 parents 1ec3f23 + e5af53a commit 7012a86
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/yieldmoBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ export const spec = {
// case of undefined, stringify will remove param
gdprApplies: bidderRequest && bidderRequest.gdprConsent ? bidderRequest.gdprConsent.gdprApplies : undefined,
cmp: bidderRequest && bidderRequest.gdprConsent ? bidderRequest.gdprConsent.consentString : undefined
})
}),
us_privacy: bidderRequest && bidderRequest.us_privacy,
};

bidRequests.forEach((request) => {
Expand Down Expand Up @@ -74,7 +75,6 @@ export const spec = {
/**
* Makes Yieldmo Ad Server response compatible to Prebid specs
* @param serverResponse successful response from Ad Server
* @param bidderRequest original bidRequest
* @return {Bid[]} an array of bids
*/
interpretResponse: function(serverResponse) {
Expand Down
7 changes: 7 additions & 0 deletions test/spec/modules/yieldmoBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,13 @@ describe('YieldmoAdapter', function () {
}));
});

it('should add ccpa information to request if available', () => {
const privacy = '1YNY';
bidderRequest.us_privacy = privacy;
const data = spec.buildRequests(bidArray, bidderRequest).data;
expect(data.us_privacy).equal(privacy);
});

it('should add schain if it is in the bidRequest', () => {
const schain = {'ver': '1.0', 'complete': 1, 'nodes': [{'asi': 'indirectseller.com', 'sid': '00001', 'hp': 1}]};
bidArray[0].schain = schain;
Expand Down

0 comments on commit 7012a86

Please sign in to comment.