diff --git a/modules/conversantBidAdapter.js b/modules/conversantBidAdapter.js index cb0661c4417..90865493d8d 100644 --- a/modules/conversantBidAdapter.js +++ b/modules/conversantBidAdapter.js @@ -99,7 +99,9 @@ export const spec = { imp.banner = banner; } - if (bid.crumbs && bid.crumbs.pubcid) { + if (bid.userId && bid.userId.pubcid) { + pubcid = bid.userId.pubcid; + } else if (bid.crumbs && bid.crumbs.pubcid) { pubcid = bid.crumbs.pubcid; } diff --git a/test/spec/modules/conversantBidAdapter_spec.js b/test/spec/modules/conversantBidAdapter_spec.js index 34991252fa8..bfe3c6e8fa1 100644 --- a/test/spec/modules/conversantBidAdapter_spec.js +++ b/test/spec/modules/conversantBidAdapter_spec.js @@ -375,6 +375,19 @@ describe('Conversant adapter tests', function() { expect(payload).to.have.deep.nested.property('user.ext.fpc', 12345); }); + it('Verify User ID publisher commond id support', function() { + // clone bidRequests + let requests = utils.deepClone(bidRequests) + + // add pubcid to every entry + requests.forEach((unit) => { + Object.assign(unit, {userId: {pubcid: 67890}}); + }); + // construct http post payload + const payload = spec.buildRequests(requests).data; + expect(payload).to.have.deep.nested.property('user.ext.fpc', 67890); + }); + it('Verify GDPR bid request', function() { // add gdpr info const bidRequest = {