Skip to content

Commit

Permalink
Logicad Bid Adapter: add support for userid modules (#6529)
Browse files Browse the repository at this point in the history
  • Loading branch information
logicad committed Apr 12, 2021
1 parent 1107655 commit c19e855
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 2 deletions.
1 change: 1 addition & 0 deletions modules/logicadBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ function newBidRequest(bid, bidderRequest) {
prebidJsVersion: '$prebid.version$',
referrer: bidderRequest.refererInfo.referer,
auctionStartTime: bidderRequest.auctionStart,
eids: bid.userIdAsEids,
};
}

Expand Down
41 changes: 39 additions & 2 deletions test/spec/modules/logicadBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,23 @@ describe('LogicadAdapter', function () {
banner: {
sizes: [[300, 250], [300, 600]]
}
}
},
userId: {
sharedid: {
id: 'fakesharedid',
third: 'fakesharedid'
}
},
userIdAsEids: [{
source: 'sharedid.org',
uids: [{
id: 'fakesharedid',
atype: 1,
ext: {
third: 'fakesharedid'
}
}]
}]
}];
const nativeBidRequests = [{
bidder: 'logicad',
Expand All @@ -45,7 +61,23 @@ describe('LogicadAdapter', function () {
required: true
}
}
}
},
userId: {
sharedid: {
id: 'fakesharedid',
third: 'fakesharedid'
}
},
userIdAsEids: [{
source: 'sharedid.org',
uids: [{
id: 'fakesharedid',
atype: 1,
ext: {
third: 'fakesharedid'
}
}]
}]
}];
const bidderRequest = {
refererInfo: {
Expand Down Expand Up @@ -141,6 +173,11 @@ describe('LogicadAdapter', function () {
expect(request.method).to.equal('POST');
expect(request.url).to.equal('https://pb.ladsp.com/adrequest/prebid');
expect(request.data).to.exist;

const data = JSON.parse(request.data);
expect(data.auctionId).to.equal('18fd8b8b0bd757');
expect(data.eids[0].source).to.equal('sharedid.org');
expect(data.eids[0].uids[0].id).to.equal('fakesharedid');
});
});

Expand Down

0 comments on commit c19e855

Please sign in to comment.