Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions modules/taboolaBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,9 @@ export const spec = {
}

const ortb2 = bidderRequest.ortb2 || {
bcat: [],
badv: [],
bcat: []
wlang: []
};

const request = {
Expand All @@ -118,8 +119,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.badv || [],
wlang: ortb2.wlang || bidRequest.params.wlang || [],
user,
regs
};
Expand Down Expand Up @@ -151,7 +153,7 @@ export const spec = {
},
};

function getSiteProperties({publisherId, bcat = []}, refererInfo) {
function getSiteProperties({publisherId}, refererInfo) {
const {getPageUrl, getReferrer} = internal;
return {
id: publisherId,
Expand Down
19 changes: 19 additions & 0 deletions test/spec/modules/taboolaBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ describe('Taboola Adapter', function () {
'source': {'fd': 1},
'bcat': [],
'badv': [],
'wlang': [],
'user': {
'buyeruid': 0,
'ext': {},
Expand Down Expand Up @@ -216,6 +217,24 @@ 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)
expect(resData.badv).to.deep.equal(bidderRequest.ortb2.badv)
expect(resData.wlang).to.deep.equal(bidderRequest.ortb2.wlang)
});
});

describe('handle privacy segments when building request', function () {
it('should pass GDPR consent', function () {
const bidderRequest = {
Expand Down