Skip to content

Commit

Permalink
Merge pull request #17 from mbrtargeting/master
Browse files Browse the repository at this point in the history
Merging master into stroeer-bidder
  • Loading branch information
MartinLopez14 authored Apr 22, 2024
2 parents 8785038 + 21baa75 commit 8276bd0
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
6 changes: 6 additions & 0 deletions modules/stroeerCoreBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,12 @@ export const spec = {
utils.deepSetValue(commonPayload, DSA_KEY, dsa);
}

const COOKIE_DEPRECATION_LABEL_KEY = 'ortb2.device.ext.cdep';
const cdep = utils.deepAccess(bidderRequest, COOKIE_DEPRECATION_LABEL_KEY);
if (cdep) {
utils.deepSetValue(commonPayload, COOKIE_DEPRECATION_LABEL_KEY, cdep);
}

const serverRequestInfos = [];
const endpointUrl = buildUrl(anyBid.params);

Expand Down
21 changes: 21 additions & 0 deletions test/spec/modules/stroeerCoreBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1238,6 +1238,27 @@ describe('stroeerCore bid adapter', function () {

assert.deepEqual(sentOrtb2, ortb2);
});

it('should add the Cookie Deprecation Label', () => {
const bidReq = buildBidderRequest();

const cDepObj = {
cdep: 'example_label_1'
};

const ortb2 = {
device: {
ext: cDepObj
}
};

bidReq.ortb2 = utils.deepClone(ortb2);

const serverRequestInfo = spec.buildRequests(bidReq.bids, bidReq)[0];
const sentOrtb2 = serverRequestInfo.data.ortb2;

assert.deepEqual(sentOrtb2, ortb2);
});
});
});

Expand Down

0 comments on commit 8276bd0

Please sign in to comment.