Skip to content

Commit

Permalink
Missena Bid Adapter: send cookieDeprecationLabel and prebid version (p…
Browse files Browse the repository at this point in the history
  • Loading branch information
pdamoc authored and Kevin Siow committed Mar 1, 2024
1 parent 65c09aa commit 6dec933
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/missenaBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,11 @@ export const spec = {
if (bidRequest.params.isInternal) {
payload.is_internal = bidRequest.params.isInternal;
}
if (bidRequest.ortb2?.device?.ext?.cdep) {
payload.cdep = bidRequest.ortb2?.device?.ext?.cdep;
}
payload.userEids = bidRequest.userIdAsEids || [];
payload.version = '$prebid.version$';

const bidFloor = getFloor(bidRequest);
payload.floor = bidFloor?.floor;
Expand Down
14 changes: 14 additions & 0 deletions test/spec/modules/missenaBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { BANNER } from '../../../src/mediaTypes.js';

const REFERRER = 'https://referer';
const REFERRER2 = 'https://referer2';
const COOKIE_DEPRECATION_LABEL = 'test';

describe('Missena Adapter', function () {
$$PREBID_GLOBAL$$.bidderSettings = {
Expand All @@ -18,6 +19,11 @@ describe('Missena Adapter', function () {
bidId: bidId,
sizes: [[1, 1]],
mediaTypes: { banner: { sizes: [[1, 1]] } },
ortb2: {
device: {
ext: { cdep: COOKIE_DEPRECATION_LABEL },
},
},
params: {
apiKey: 'PA-34745704',
placement: 'sticky',
Expand Down Expand Up @@ -183,6 +189,14 @@ describe('Missena Adapter', function () {
it('should participate if capped on a different page', function () {
expect(cappedRequestsOtherPage.length).to.equal(2);
});

it('should send the prebid version', function () {
expect(payload.version).to.equal('$prebid.version$');
});

it('should send cookie deprecation', function () {
expect(payload.cdep).to.equal(COOKIE_DEPRECATION_LABEL);
});
});

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

0 comments on commit 6dec933

Please sign in to comment.