From fd32042ef8f164fb1cd6b09c8ea6da7fdf64afbe Mon Sep 17 00:00:00 2001 From: MK Platform <88486298+mediakeys-platform@users.noreply.github.com> Date: Wed, 9 Feb 2022 15:44:13 +0100 Subject: [PATCH] Fix `geo` first party data (#8013) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit that should not be attached to `device` but to `user` litteral Co-authored-by: François Maturel --- modules/mediakeysBidAdapter.js | 5 ----- test/spec/modules/mediakeysBidAdapter_spec.js | 14 +++++++++----- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/modules/mediakeysBidAdapter.js b/modules/mediakeysBidAdapter.js index 72dca2f1add..6e7ef08ce50 100644 --- a/modules/mediakeysBidAdapter.js +++ b/modules/mediakeysBidAdapter.js @@ -653,11 +653,6 @@ export const spec = { if (fpd.user) { mergeDeep(payload, { user: fpd.user }); } - // Here we can handle device.geo prop - const deviceGeo = deepAccess(fpd, 'device.geo'); - if (deviceGeo) { - mergeDeep(payload.device, { geo: deviceGeo }); - } const request = { method: 'POST', diff --git a/test/spec/modules/mediakeysBidAdapter_spec.js b/test/spec/modules/mediakeysBidAdapter_spec.js index 602524e6eb3..10869f5e35e 100644 --- a/test/spec/modules/mediakeysBidAdapter_spec.js +++ b/test/spec/modules/mediakeysBidAdapter_spec.js @@ -575,12 +575,15 @@ describe('mediakeysBidAdapter', function () { }, user: { yob: 1985, - gender: 'm' - }, - device: { + gender: 'm', geo: { country: 'FR', city: 'Marseille' + }, + ext: { + data: { + registered: true + } } } } @@ -596,8 +599,9 @@ describe('mediakeysBidAdapter', function () { expect(data.site.ext.data.category).to.equal('sport'); expect(data.user.yob).to.equal(1985); expect(data.user.gender).to.equal('m'); - expect(data.device.geo.country).to.equal('FR'); - expect(data.device.geo.city).to.equal('Marseille'); + expect(data.user.geo.country).to.equal('FR'); + expect(data.user.geo.city).to.equal('Marseille'); + expect(data.user.ext.data.registered).to.be.true; }); });