diff --git a/modules/pubmaticBidAdapter.js b/modules/pubmaticBidAdapter.js index 73e6d8cfb52..dc22b9c57ae 100644 --- a/modules/pubmaticBidAdapter.js +++ b/modules/pubmaticBidAdapter.js @@ -648,7 +648,7 @@ function _handleEids(payload, validBidRequests) { _addExternalUserId(eids, utils.deepAccess(bidRequest, `userId.pubcid`), 'pubcommon', 1); _addExternalUserId(eids, utils.deepAccess(bidRequest, `userId.digitrustid.data.id`), 'digitru.st', 1); _addExternalUserId(eids, utils.deepAccess(bidRequest, `userId.id5id`), 'id5-sync.com', 1); - _addExternalUserId(eids, utils.deepAccess(bidRequest, `userId.criteortus.${BIDDER_CODE}.userid`), 'criteortus', 1); + _addExternalUserId(eids, utils.deepAccess(bidRequest, `userId.criteoId`), 'criteo.com', 1);// replacing criteoRtus _addExternalUserId(eids, utils.deepAccess(bidRequest, `userId.idl_env`), 'liveramp.com', 1); _addExternalUserId(eids, utils.deepAccess(bidRequest, `userId.lipb.lipbid`), 'liveintent.com', 1); _addExternalUserId(eids, utils.deepAccess(bidRequest, `userId.parrableid`), 'parrable.com', 1); diff --git a/test/spec/modules/pubmaticBidAdapter_spec.js b/test/spec/modules/pubmaticBidAdapter_spec.js index feb64dfe4ac..13d5a91d16a 100644 --- a/test/spec/modules/pubmaticBidAdapter_spec.js +++ b/test/spec/modules/pubmaticBidAdapter_spec.js @@ -1625,16 +1625,16 @@ describe('PubMatic adapter', function () { }); }); - describe('CriteoRTUS Id', function() { + describe('Criteo Id', function() { it('send the criteo id if it is present', function() { bidRequests[0].userId = {}; - bidRequests[0].userId.criteortus = {pubmatic: {userid: 'criteo-rtus-user-id'}}; + bidRequests[0].userId.criteoId = 'criteo-user-id'; let request = spec.buildRequests(bidRequests, {}); let data = JSON.parse(request.data); expect(data.user.eids).to.deep.equal([{ - 'source': 'criteortus', + 'source': 'criteo.com', 'uids': [{ - 'id': 'criteo-rtus-user-id', + 'id': 'criteo-user-id', 'atype': 1 }] }]); @@ -1642,23 +1642,19 @@ describe('PubMatic adapter', function () { it('do not pass if not string', function() { bidRequests[0].userId = {}; - bidRequests[0].userId.criteortus = {appnexus: {userid: 'criteo-rtus-user-id'}}; + bidRequests[0].userId.criteoId = 1; let request = spec.buildRequests(bidRequests, {}); let data = JSON.parse(request.data); expect(data.user.eids).to.equal(undefined); - bidRequests[0].userId.criteortus = {pubmatic: {userid: 1}}; + bidRequests[0].userId.criteoId = []; request = spec.buildRequests(bidRequests, {}); data = JSON.parse(request.data); expect(data.user.eids).to.equal(undefined); - bidRequests[0].userId.criteortus = {pubmatic: {userid: []}}; + bidRequests[0].userId.criteoId = null; request = spec.buildRequests(bidRequests, {}); data = JSON.parse(request.data); expect(data.user.eids).to.equal(undefined); - bidRequests[0].userId.criteortus = {pubmatic: {userid: null}}; - request = spec.buildRequests(bidRequests, {}); - data = JSON.parse(request.data); - expect(data.user.eids).to.equal(undefined); - bidRequests[0].userId.criteortus = {pubmatic: {userid: {}}}; + bidRequests[0].userId.criteoId = {}; request = spec.buildRequests(bidRequests, {}); data = JSON.parse(request.data); expect(data.user.eids).to.equal(undefined);