Skip to content

Commit

Permalink
Sortable Bid Adapter: Set gpid (#7608)
Browse files Browse the repository at this point in the history
  • Loading branch information
liliana-sortable authored Oct 21, 2021
1 parent d61717b commit a5282aa
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions modules/sortableBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ export const spec = {
rv.ext[partner] = params;
});
}
rv.ext.gpid = deepAccess(bid, 'ortb2Imp.ext.data.pbadslot');
return rv;
});
const gdprConsent = bidderRequest && bidderRequest.gdprConsent;
Expand Down
11 changes: 11 additions & 0 deletions test/spec/modules/sortableBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,13 @@ describe('sortableBidAdapter', function() {
'key2': 'val2'
}
},
'ortb2Imp': {
'ext': {
'data': {
'pbadslot': 'abc/123'
}
}
},
'sizes': [
[300, 250]
],
Expand Down Expand Up @@ -176,6 +183,10 @@ describe('sortableBidAdapter', function() {
expect(requestBody.imp[0].floor).to.equal(0.21);
});

it('includes pbadslot in the bid request', function () {
expect(requestBody.imp[0].ext.gpid).to.equal('abc/123');
});

it('sets domain and href correctly', function () {
expect(requestBody.site.domain).to.equal('example.com');
expect(requestBody.site.page).to.equal('http://example.com/page?param=val');
Expand Down

0 comments on commit a5282aa

Please sign in to comment.