diff --git a/modules/appnexusBidAdapter.js b/modules/appnexusBidAdapter.js index ff0e3230007..f714472bbb1 100644 --- a/modules/appnexusBidAdapter.js +++ b/modules/appnexusBidAdapter.js @@ -229,16 +229,20 @@ export const spec = { } const criteoId = utils.deepAccess(bidRequests[0], `userId.criteoId`); + let eids = []; if (criteoId) { let tpuids = []; tpuids.push({ 'provider': 'criteo', 'user_id': criteoId }); + eids.push({ + source: 'criteo.com', + id: criteoId + }); payload.tpuids = tpuids; } - let eids = []; const tdid = utils.deepAccess(bidRequests[0], `userId.tdid`); if (tdid) { eids.push({ diff --git a/test/spec/modules/appnexusBidAdapter_spec.js b/test/spec/modules/appnexusBidAdapter_spec.js index 4102896ba94..21d3da358be 100644 --- a/test/spec/modules/appnexusBidAdapter_spec.js +++ b/test/spec/modules/appnexusBidAdapter_spec.js @@ -824,6 +824,11 @@ describe('AppNexusAdapter', function () { rti_partner: 'TDID' }); + expect(payload.eids).to.deep.include({ + source: 'criteo.com', + id: 'sample-criteo-userid', + }); + expect(payload.tpuids).to.deep.include({ provider: 'criteo', user_id: 'sample-criteo-userid',