From 6dec9331106140b85b4362c076b74ce2241f4c18 Mon Sep 17 00:00:00 2001 From: Petre Damoc Date: Wed, 24 Jan 2024 22:11:02 +0200 Subject: [PATCH] Missena Bid Adapter: send cookieDeprecationLabel and prebid version (#10979) --- modules/missenaBidAdapter.js | 4 ++++ test/spec/modules/missenaBidAdapter_spec.js | 14 ++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/modules/missenaBidAdapter.js b/modules/missenaBidAdapter.js index 5e68f56ed1c..080ed2a556f 100644 --- a/modules/missenaBidAdapter.js +++ b/modules/missenaBidAdapter.js @@ -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; diff --git a/test/spec/modules/missenaBidAdapter_spec.js b/test/spec/modules/missenaBidAdapter_spec.js index a51cb8bbac9..f84981352ab 100644 --- a/test/spec/modules/missenaBidAdapter_spec.js +++ b/test/spec/modules/missenaBidAdapter_spec.js @@ -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 = { @@ -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', @@ -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 () {