From f0302981534159bc857242d101480197c32f738c Mon Sep 17 00:00:00 2001 From: kushneryk Date: Thu, 5 May 2022 17:24:32 +0300 Subject: [PATCH] bizzclickAdapter refactiring, remove privacy settings duplication --- modules/bizzclickBidAdapter.js | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/modules/bizzclickBidAdapter.js b/modules/bizzclickBidAdapter.js index 6223626834d..a798671cbaf 100644 --- a/modules/bizzclickBidAdapter.js +++ b/modules/bizzclickBidAdapter.js @@ -95,6 +95,7 @@ export const spec = { }, regs: { coppa: config.getConfig('coppa') === true ? 1 : 0, + ext: {} }, user: { ext: {} @@ -106,25 +107,15 @@ export const spec = { imp: [impObject], }; - if (bidderRequest && bidderRequest.uspConsent) { - data.regs.ext.us_privacy = bidderRequest.uspConsent; - } - - if (bidderRequest && bidderRequest.gdprConsent) { - let { gdprApplies, consentString } = bidderRequest.gdprConsent; - data.regs.ext.gdpr = gdprApplies ? 1 : 0; - data.user.ext.consent = consentString; - } - - if (bidRequest.schain) { - deepSetValue(data, 'source.ext.schain', bidRequest.schain); - } - let connection = navigator.connection || navigator.webkitConnection; if (connection && connection.effectiveType) { data.device.connectiontype = connection.effectiveType; } if (bidRequest) { + if (bidRequest.schain) { + deepSetValue(data, 'source.ext.schain', bidRequest.schain); + } + if (bidRequest.gdprConsent && bidRequest.gdprConsent.gdprApplies) { deepSetValue(data, 'regs.ext.gdpr', bidRequest.gdprConsent.gdprApplies ? 1 : 0); deepSetValue(data, 'user.ext.consent', bidRequest.gdprConsent.consentString);