From 7ca7dfe96d943211f68d52bedd471e8dc649f99f Mon Sep 17 00:00:00 2001 From: Ahmad Lobany Date: Wed, 21 Dec 2022 13:54:36 +0200 Subject: [PATCH 1/4] support-fpd --- modules/taboolaBidAdapter.js | 11 ++++------- test/spec/modules/taboolaBidAdapter_spec.js | 16 ++++++++++++++++ 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/modules/taboolaBidAdapter.js b/modules/taboolaBidAdapter.js index 670d28ab6..c57ef2f20 100644 --- a/modules/taboolaBidAdapter.js +++ b/modules/taboolaBidAdapter.js @@ -106,11 +106,7 @@ export const spec = { regs.coppa = 1; } - const ortb2 = bidderRequest.ortb2 || { - badv: [], - bcat: [] - }; - + const ortb2 = bidderRequest.ortb2; const request = { id: bidderRequest.auctionId, imp: imps, @@ -118,8 +114,9 @@ export const spec = { device, source: {fd: 1}, tmax: bidderRequest.timeout, - bcat: ortb2.bcat, - badv: ortb2.badv, + bcat: ortb2.bcat || bidRequest.params.bcat || [], + badv: ortb2.badv || bidRequest.params.adv || [], + wlang: ortb2.wlang || bidRequest.params.wlang || [], user, regs }; diff --git a/test/spec/modules/taboolaBidAdapter_spec.js b/test/spec/modules/taboolaBidAdapter_spec.js index 5bde75cd0..aab16f93b 100644 --- a/test/spec/modules/taboolaBidAdapter_spec.js +++ b/test/spec/modules/taboolaBidAdapter_spec.js @@ -216,6 +216,22 @@ describe('Taboola Adapter', function () { expect(resData.tmax).to.equal(500); }); + describe('first party data', function () { + it('should parse first party data', function () { + const bidderRequest = { + ...commonBidderRequest, + ortb2: { + bcat: ['EX1', 'EX2', 'EX3'], + badv: ['site.com'], + wlang: ['de'], + } + } + const res = spec.buildRequests([defaultBidRequest], bidderRequest); + const resData = JSON.parse(res.data); + expect(resData.bcat).to.deep.equal(bidderRequest.ortb2.bcat) + }); + }); + describe('handle privacy segments when building request', function () { it('should pass GDPR consent', function () { const bidderRequest = { From eb2e736aabadc185bbbe39c39b50f898e4bed20c Mon Sep 17 00:00:00 2001 From: Ahmad Lobany Date: Wed, 21 Dec 2022 13:55:55 +0200 Subject: [PATCH 2/4] support-fpd --- test/spec/modules/taboolaBidAdapter_spec.js | 1 + 1 file changed, 1 insertion(+) diff --git a/test/spec/modules/taboolaBidAdapter_spec.js b/test/spec/modules/taboolaBidAdapter_spec.js index aab16f93b..0bcb01713 100644 --- a/test/spec/modules/taboolaBidAdapter_spec.js +++ b/test/spec/modules/taboolaBidAdapter_spec.js @@ -137,6 +137,7 @@ describe('Taboola Adapter', function () { 'source': {'fd': 1}, 'bcat': [], 'badv': [], + 'wlang': [], 'user': { 'buyeruid': 0, 'ext': {}, From f7fc8a41ebbab1b26401d478dd1fb91ca49a5597 Mon Sep 17 00:00:00 2001 From: Ahmad Lobany Date: Wed, 21 Dec 2022 13:58:49 +0200 Subject: [PATCH 3/4] support-fpd --- modules/taboolaBidAdapter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/taboolaBidAdapter.js b/modules/taboolaBidAdapter.js index c57ef2f20..242a5d4c3 100644 --- a/modules/taboolaBidAdapter.js +++ b/modules/taboolaBidAdapter.js @@ -115,7 +115,7 @@ export const spec = { source: {fd: 1}, tmax: bidderRequest.timeout, bcat: ortb2.bcat || bidRequest.params.bcat || [], - badv: ortb2.badv || bidRequest.params.adv || [], + badv: ortb2.badv || bidRequest.params.badv || [], wlang: ortb2.wlang || bidRequest.params.wlang || [], user, regs From 7bd71bf8e94945526ec39d5e94f6a28ae961e77b Mon Sep 17 00:00:00 2001 From: Ahmad Lobany Date: Wed, 21 Dec 2022 14:06:55 +0200 Subject: [PATCH 4/4] support-fpd --- test/spec/modules/taboolaBidAdapter_spec.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/spec/modules/taboolaBidAdapter_spec.js b/test/spec/modules/taboolaBidAdapter_spec.js index 0bcb01713..5ad134b5d 100644 --- a/test/spec/modules/taboolaBidAdapter_spec.js +++ b/test/spec/modules/taboolaBidAdapter_spec.js @@ -230,6 +230,8 @@ describe('Taboola Adapter', function () { const res = spec.buildRequests([defaultBidRequest], bidderRequest); const resData = JSON.parse(res.data); expect(resData.bcat).to.deep.equal(bidderRequest.ortb2.bcat) + expect(resData.badv).to.deep.equal(bidderRequest.ortb2.badv) + expect(resData.wlang).to.deep.equal(bidderRequest.ortb2.wlang) }); });