diff --git a/modules/taboolaBidAdapter.js b/modules/taboolaBidAdapter.js index f0f11ea113e..b0418ab9865 100644 --- a/modules/taboolaBidAdapter.js +++ b/modules/taboolaBidAdapter.js @@ -225,10 +225,13 @@ function fillTaboolaReqData(bidderRequest, bidRequest, data) { const {refererInfo, gdprConsent = {}, uspConsent} = bidderRequest; const site = getSiteProperties(bidRequest.params, refererInfo, bidderRequest.ortb2); const device = {ua: navigator.userAgent}; - const user = { + let user = { buyeruid: userData.getUserId(gdprConsent, uspConsent), ext: {} }; + if (bidderRequest && bidderRequest.ortb2 && bidderRequest.ortb2.user) { + user.data = bidderRequest.ortb2.user.data; + } const regs = { coppa: 0, ext: {} diff --git a/modules/topicsFpdModule.js b/modules/topicsFpdModule.js index b5a90dacfb4..748242142c4 100644 --- a/modules/topicsFpdModule.js +++ b/modules/topicsFpdModule.js @@ -38,6 +38,9 @@ const bidderIframeList = { }, { bidder: 'onetag', iframeURL: 'https://onetag-sys.com/static/topicsapi.html' + }, { + bidder: 'taboola', + iframeURL: 'https://cdn.taboola.com/libtrc/static/topics/taboola-prebid-browsing-topics.html' }] } diff --git a/modules/topicsFpdModule.md b/modules/topicsFpdModule.md index 89eb03fb6df..e8daded4439 100644 --- a/modules/topicsFpdModule.md +++ b/modules/topicsFpdModule.md @@ -56,6 +56,10 @@ pbjs.setConfig({ bidder: 'onetag', iframeURL: 'https://onetag-sys.com/static/topicsapi.html', expiry: 7 // Configurable expiry days + }, { + bidder: 'taboola', + iframeURL: 'https://cdn.taboola.com/libtrc/static/topics/taboola-prebid-browsing-topics.html', + expiry: 7 // Configurable expiry days }] } .... @@ -71,4 +75,4 @@ pbjs.setConfig({ | topics.bidders | no | Array of objects | Array of topics callers with the iframe locations and other necessary informations like bidder(Bidder code) and expiry. Default Array of topics in the module itself.| | topics.bidders[].bidder | yes | string | Bidder Code of the bidder(SSP). | | topics.bidders[].iframeURL | yes | string | URL which is hosted on bidder/SSP/third-party domains which will call Topics API. | -| topics.bidders[].expiry | no | integer | Max number of days where Topics data will be persist. If Data is stored for more than mentioned expiry day, it will be deleted from storage. Default is 21 days which is hardcoded in Module. | \ No newline at end of file +| topics.bidders[].expiry | no | integer | Max number of days where Topics data will be persist. If Data is stored for more than mentioned expiry day, it will be deleted from storage. Default is 21 days which is hardcoded in Module. | diff --git a/test/spec/modules/taboolaBidAdapter_spec.js b/test/spec/modules/taboolaBidAdapter_spec.js index 8a121865cf2..39df2eb4a99 100644 --- a/test/spec/modules/taboolaBidAdapter_spec.js +++ b/test/spec/modules/taboolaBidAdapter_spec.js @@ -398,6 +398,30 @@ describe('Taboola Adapter', function () { const res = spec.buildRequests([defaultBidRequest], bidderRequest); expect(res.data.ext.example).to.deep.equal(bidderRequest.ortb2.ext.example); }); + + it('should pass additional parameter in request for topics', function () { + const ortb2 = { + ...commonBidderRequest, + ortb2: { + user: { + data: { + segment: [ + { + id: '243' + } + ], + name: 'pa.taboola.com', + ext: { + segclass: '4', + segtax: 601 + } + } + } + } + } + const res = spec.buildRequests([defaultBidRequest], {...ortb2}) + expect(res.data.user.data).to.deep.equal(ortb2.ortb2.user.data); + }); }); describe('handle privacy segments when building request', function () {