Skip to content

Commit

Permalink
Taboola Bid Adapter: pass nurl to bidResponse (#9482)
Browse files Browse the repository at this point in the history
* nurl-bugfix

* nurl-bugfix
  • Loading branch information
ahmadlob authored Jan 31, 2023
1 parent 9be4e4d commit cb1a982
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
3 changes: 2 additions & 1 deletion modules/taboolaBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ function getBid(bids, currency, bidResponse) {
return;
}
const {
price: cpm, crid: creativeId, adm: ad, w: width, h: height, exp: ttl, adomain: advertiserDomains, meta = {}
price: cpm, nurl, crid: creativeId, adm: ad, w: width, h: height, exp: ttl, adomain: advertiserDomains, meta = {}
} = bidResponse;
let requestId = bids[bidResponse.impid - 1].bidId;
if (advertiserDomains && advertiserDomains.length > 0) {
Expand All @@ -297,6 +297,7 @@ function getBid(bids, currency, bidResponse) {
width,
height,
meta,
nurl,
netRevenue: true
};
}
Expand Down
15 changes: 12 additions & 3 deletions test/spec/modules/taboolaBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,9 @@ describe('Taboola Adapter', function () {
'w': 300,
'h': 250,
'exp': 60,
'lurl': 'http://us-trc.taboola.com/sample'
'lurl': 'http://us-trc.taboola.com/sample',
'nurl': 'http://win.example.com/',

}
],
'seat': '14204545260'
Expand Down Expand Up @@ -546,7 +548,8 @@ describe('Taboola Adapter', function () {
'w': 300,
'h': 250,
'exp': 60,
'lurl': 'http://us-trc.taboola.com/sample'
'lurl': 'http://us-trc.taboola.com/sample',
'nurl': 'http://win.example.com/'
},
{
'id': '0b3dd94348-134b-435f-8db5-6bf5afgfc39e86c',
Expand All @@ -562,7 +565,9 @@ describe('Taboola Adapter', function () {
'w': 300,
'h': 250,
'exp': 60,
'lurl': 'http://us-trc.taboola.com/sample'
'lurl': 'http://us-trc.taboola.com/sample',
'nurl': 'http://win.example.com/'

}
],
'seat': '14204545260'
Expand All @@ -586,6 +591,7 @@ describe('Taboola Adapter', function () {
ad: multiServerResponse.body.seatbid[0].bid[0].adm,
width: bid.w,
height: bid.h,
nurl: 'http://win.example.com/',
meta: {
'advertiserDomains': bid.adomain
},
Expand All @@ -601,6 +607,7 @@ describe('Taboola Adapter', function () {
ad: multiServerResponse.body.seatbid[0].bid[1].adm,
width: bid.w,
height: bid.h,
nurl: 'http://win.example.com/',
meta: {
'advertiserDomains': bid.adomain
},
Expand All @@ -625,6 +632,7 @@ describe('Taboola Adapter', function () {
ad: bid.adm,
width: bid.w,
height: bid.h,
nurl: 'http://win.example.com/',
meta: {
'advertiserDomains': bid.adomain
},
Expand All @@ -651,6 +659,7 @@ describe('Taboola Adapter', function () {
ad: bid.adm,
width: bid.w,
height: bid.h,
nurl: 'http://win.example.com/',
meta: {
'advertiserDomains': bid.adomain
},
Expand Down

0 comments on commit cb1a982

Please sign in to comment.