Skip to content

Commit

Permalink
StroeerCore Bid Adapter: add the ortb2 site extension to the request
Browse files Browse the repository at this point in the history
  • Loading branch information
philipwatson committed Nov 19, 2024
1 parent d38615e commit a50a821
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion modules/stroeerCoreBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ export const spec = {
};
}

const ORTB2_KEYS = ['regs.ext.dsa', 'device.ext.cdep', 'source.tid'];
const ORTB2_KEYS = ['regs.ext.dsa', 'device.ext.cdep', 'source.tid', 'site.ext'];
ORTB2_KEYS.forEach(key => {
const value = utils.deepAccess(bidderRequest.ortb2, key);
if (value !== undefined) {
Expand Down
22 changes: 22 additions & 0 deletions test/spec/modules/stroeerCoreBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1350,6 +1350,28 @@ describe('stroeerCore bid adapter', function() {

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

it('should add the ortb2 site extension', () => {
const bidReq = buildBidderRequest();

const ortb2 = {
site: {
domain: 'example.com',
ext: {
data: {
abc: '123'
}
}
}
};

bidReq.ortb2 = utils.deepClone(ortb2);

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

const sentOrtb2 = serverRequestInfo.data.ortb2;
assert.deepEqual(sentOrtb2, {site: {ext: ortb2.site.ext}})
});
});

describe('Split bid requests', () => {
Expand Down

0 comments on commit a50a821

Please sign in to comment.