diff --git a/modules/sortableBidAdapter.js b/modules/sortableBidAdapter.js index c1cb607e5ab..15246a10eab 100644 --- a/modules/sortableBidAdapter.js +++ b/modules/sortableBidAdapter.js @@ -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; diff --git a/test/spec/modules/sortableBidAdapter_spec.js b/test/spec/modules/sortableBidAdapter_spec.js index 17f77e96d51..7357fa77952 100644 --- a/test/spec/modules/sortableBidAdapter_spec.js +++ b/test/spec/modules/sortableBidAdapter_spec.js @@ -112,6 +112,13 @@ describe('sortableBidAdapter', function() { 'key2': 'val2' } }, + 'ortb2Imp': { + 'ext': { + 'data': { + 'pbadslot': 'abc/123' + } + } + }, 'sizes': [ [300, 250] ], @@ -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');