From 13818ce0c16f61722a7d5a3615d9d1f40a1f100b Mon Sep 17 00:00:00 2001 From: jgarciaorad Date: Fri, 28 Apr 2023 16:54:29 +0200 Subject: [PATCH 1/4] 10207_include setConfig function and intruccions in readme file --- modules/tappxBidAdapter.js | 10 ++++++++++ modules/tappxBidAdapter.md | 17 +++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/modules/tappxBidAdapter.js b/modules/tappxBidAdapter.js index 3cd77e7b853..789226b3640 100644 --- a/modules/tappxBidAdapter.js +++ b/modules/tappxBidAdapter.js @@ -251,6 +251,7 @@ function buildOneRequest(validBidRequests, bidderRequest) { const BIDEXTRA = deepAccess(validBidRequests, 'params.ext'); const bannerMediaType = deepAccess(validBidRequests, 'mediaTypes.banner'); const videoMediaType = deepAccess(validBidRequests, 'mediaTypes.video'); + const ORTB2 = config.getConfig()?.ortb2; // let requests = []; let payload = {}; @@ -393,6 +394,15 @@ function buildOneRequest(validBidRequests, bidderRequest) { let geo = {}; geo.country = deepAccess(validBidRequests, 'params.geo.country'); // < Device object + let configGeo = {}; + configGeo.country = ORTB2?.device?.geo; + + // > GDPR + if(typeof configGeo.country !== 'undefined'){ + device.geo = configGeo; + }else if(typeof geo.country !== 'undefined' ){ + device.geo = geo; + }; // > GDPR let user = {}; diff --git a/modules/tappxBidAdapter.md b/modules/tappxBidAdapter.md index 677718c261c..e056ae4cc98 100644 --- a/modules/tappxBidAdapter.md +++ b/modules/tappxBidAdapter.md @@ -92,3 +92,20 @@ Ads sizes available: [300,250], [320,50], [320,480], [480,320], [728,90], [768,1 } ]; ``` +### Configuration + +Use `setConfig` to configure this submodule ortb2.device.geo, by this way you will allow geolocation +Goe setted in config object will be priorized + +```javascript +var TIMEOUT = 1000; +pbjs.setConfig({ + ortb2:{ + device:{ + geo:{ + country:'US' + } + } + } +}); +``` \ No newline at end of file From 49a5dba3a9971d877b8a2f3a44460252b2404d88 Mon Sep 17 00:00:00 2001 From: prebidtappx <77485538+prebidtappx@users.noreply.github.com> Date: Tue, 2 May 2023 12:04:14 +0200 Subject: [PATCH 2/4] Update tappxBidAdapter.md --- modules/tappxBidAdapter.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/tappxBidAdapter.md b/modules/tappxBidAdapter.md index e056ae4cc98..55f18531f28 100644 --- a/modules/tappxBidAdapter.md +++ b/modules/tappxBidAdapter.md @@ -94,8 +94,8 @@ Ads sizes available: [300,250], [320,50], [320,480], [480,320], [728,90], [768,1 ``` ### Configuration -Use `setConfig` to configure this submodule ortb2.device.geo, by this way you will allow geolocation -Goe setted in config object will be priorized +Use `setConfig` to configure this submodule ortb2.device.geo, this will allow geolocation +`Geo` object to bring First Party Information. ```javascript var TIMEOUT = 1000; @@ -108,4 +108,4 @@ pbjs.setConfig({ } } }); -``` \ No newline at end of file +``` From f55e5677302ca539d24224930f9a33b341907a11 Mon Sep 17 00:00:00 2001 From: prebidtappx <77485538+prebidtappx@users.noreply.github.com> Date: Tue, 2 May 2023 12:05:20 +0200 Subject: [PATCH 3/4] Update tappxBidAdapter.js --- modules/tappxBidAdapter.js | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/tappxBidAdapter.js b/modules/tappxBidAdapter.js index 789226b3640..937e68c08ab 100644 --- a/modules/tappxBidAdapter.js +++ b/modules/tappxBidAdapter.js @@ -397,7 +397,6 @@ function buildOneRequest(validBidRequests, bidderRequest) { let configGeo = {}; configGeo.country = ORTB2?.device?.geo; - // > GDPR if(typeof configGeo.country !== 'undefined'){ device.geo = configGeo; }else if(typeof geo.country !== 'undefined' ){ From 9f29b12442f3ee90c6e6a7fa1619bbebcb799716 Mon Sep 17 00:00:00 2001 From: jgarciaorad Date: Thu, 5 Sep 2024 13:20:51 +0200 Subject: [PATCH 4/4] multiple formats --- modules/tappxBidAdapter.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/modules/tappxBidAdapter.js b/modules/tappxBidAdapter.js index 0b618b3c124..28965cf8ad0 100644 --- a/modules/tappxBidAdapter.js +++ b/modules/tappxBidAdapter.js @@ -328,11 +328,8 @@ function buildOneRequest(validBidRequests, bidderRequest) { banner.api = api; - let format = {}; - format[0] = {}; - format[0].w = w; - format[0].h = h; - banner.format = format; + const formatArr = bannerMediaType.sizes.map(size => ({w: size[0], h: size[1]})) + banner.format = Object.assign({}, formatArr); imp.banner = banner; }