Skip to content

Commit

Permalink
convert bidders: bridgewell
Browse files Browse the repository at this point in the history
  • Loading branch information
dgirardi committed May 20, 2022
1 parent a237df5 commit a04ad82
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
7 changes: 4 additions & 3 deletions modules/bridgewellBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const spec = {

let topUrl = '';
if (bidderRequest && bidderRequest.refererInfo) {
topUrl = bidderRequest.refererInfo.referer;
topUrl = bidderRequest.refererInfo.page;
}

return {
Expand All @@ -85,9 +85,10 @@ export const spec = {
},
inIframe: inIframe(),
url: topUrl,
referrer: getTopWindowReferrer(),
referrer: bidderRequest.refererInfo.ref,
adUnits: adUnits,
refererInfo: bidderRequest.refererInfo,
// TODO: please do not send internal data structures over the network
refererInfo: bidderRequest.refererInfo.legacy,
},
validBidRequests: validBidRequests
};
Expand Down
15 changes: 12 additions & 3 deletions test/spec/modules/bridgewellBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,10 @@ describe('bridgewellBidAdapter', function () {
it('should attach valid params to the tag', function () {
const bidderRequest = {
refererInfo: {
referer: 'https://www.bridgewell.com/'
page: 'https://www.bridgewell.com/',
legacy: {
referer: 'https://www.bridgewell.com/',
}
}
}
const request = spec.buildRequests(bidRequests, bidderRequest);
Expand All @@ -164,7 +167,10 @@ describe('bridgewellBidAdapter', function () {
it('should attach valid params to the tag, part2', function() {
const bidderRequest = {
refererInfo: {
referer: 'https://www.bridgewell.com/'
page: 'https://www.bridgewell.com/',
legacy: {
referer: 'https://www.bridgewell.com/'
}
}
}
const bidRequests2 = [
Expand Down Expand Up @@ -206,7 +212,10 @@ describe('bridgewellBidAdapter', function () {
it('should attach validBidRequests to the tag', function () {
const bidderRequest = {
refererInfo: {
referer: 'https://www.bridgewell.com/'
page: 'https://www.bridgewell.com/',
legacy: {
referer: 'https://www.bridgewell.com/',
}
}
}

Expand Down

0 comments on commit a04ad82

Please sign in to comment.