Skip to content

Commit

Permalink
PulsePoint Bid Adapter: support for additional user id providers (pre…
Browse files Browse the repository at this point in the history
…bid#7389)

* ET-1691: Pulsepoint Analytics adapter for Prebid. (#1)

* ET-1691: Adding pulsepoint analytics and tests for pulsepoint adapter

* ET-1691: Adding pulsepoint analytics and tests for pulsepoint adapter

* ET-1691: cleanup

* ET-1691: minor

* ET-1691: revert package.json change

* Adding bidRequest to bidFactory.createBid method as per prebid#509

* ET-1765: Adding support for additional params in PulsePoint adapter (#2)

* ET-1850: Fixing prebid#866

* Minor fix

* Adding mandatory parameters to Bid

* ET-9372: PulsePoint Adapter - support for additional user id providers

* Fix for haloId
  • Loading branch information
anand-venkatraman authored and Chris Pabst committed Jan 10, 2022
1 parent a3cf9e2 commit 0490210
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 8 deletions.
12 changes: 9 additions & 3 deletions modules/pulsepointBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -421,12 +421,18 @@ function user(bidRequest, bidderRequest) {
if (bidRequest) {
if (bidRequest.userId) {
ext.eids = [];
addExternalUserId(ext.eids, bidRequest.userId.pubcid, 'pubcommon');
addExternalUserId(ext.eids, bidRequest.userId.pubcid, 'pubcid.org');
addExternalUserId(ext.eids, bidRequest.userId.britepoolid, 'britepool.com');
addExternalUserId(ext.eids, bidRequest.userId.criteoId, 'criteo');
addExternalUserId(ext.eids, bidRequest.userId.idl_env, 'identityLink');
addExternalUserId(ext.eids, bidRequest.userId.criteoId, 'criteo.com');
addExternalUserId(ext.eids, bidRequest.userId.idl_env, 'liveramp.com');
addExternalUserId(ext.eids, utils.deepAccess(bidRequest, 'userId.id5id.uid'), 'id5-sync.com', utils.deepAccess(bidRequest, 'userId.id5id.ext'));
addExternalUserId(ext.eids, utils.deepAccess(bidRequest, 'userId.parrableId.eid'), 'parrable.com');
addExternalUserId(ext.eids, bidRequest.userId.fabrickId, 'neustar.biz');
addExternalUserId(ext.eids, utils.deepAccess(bidRequest, 'userId.haloId.haloId'), 'audigent.com');
addExternalUserId(ext.eids, bidRequest.userId.merkleId, 'merkleinc.com');
addExternalUserId(ext.eids, bidRequest.userId.lotamePanoramaId, 'crwdcntrl.net');
addExternalUserId(ext.eids, bidRequest.userId.connectid, 'verizonmedia.com');
addExternalUserId(ext.eids, utils.deepAccess(bidRequest, 'userId.uid2.id'), 'uidapi.com');
// liveintent
if (bidRequest.userId.lipb && bidRequest.userId.lipb.lipbid) {
addExternalUserId(ext.eids, bidRequest.userId.lipb.lipbid, 'liveintent.com');
Expand Down
26 changes: 21 additions & 5 deletions test/spec/modules/pulsepointBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ describe('PulsePoint Adapter Tests', function () {
expect(ortbRequest.user.ext).to.not.be.undefined;
expect(ortbRequest.user.ext.eids).to.not.be.undefined;
expect(ortbRequest.user.ext.eids).to.have.lengthOf(2);
expect(ortbRequest.user.ext.eids[0].source).to.equal('pubcommon');
expect(ortbRequest.user.ext.eids[0].source).to.equal('pubcid.org');
expect(ortbRequest.user.ext.eids[0].uids).to.have.lengthOf(1);
expect(ortbRequest.user.ext.eids[0].uids[0].id).to.equal('userid_pubcid');
expect(ortbRequest.user.ext.eids[1].source).to.equal('adserver.org');
Expand All @@ -659,6 +659,16 @@ describe('PulsePoint Adapter Tests', function () {
parrableId: { eid: 'parrable_id234' },
lipb: {
lipbid: 'liveintent_id123'
},
haloId: {
haloId: 'halo_user1'
},
lotamePanoramaId: 'lotame_user2',
merkleId: 'merkle_user3',
fabrickId: 'fabrick_user4',
connectid: 'connect_user5',
uid2: {
id: 'uid2_user6'
}
};
const userVerify = function(obj, source, id) {
Expand All @@ -677,13 +687,19 @@ describe('PulsePoint Adapter Tests', function () {
expect(ortbRequest.user).to.not.be.undefined;
expect(ortbRequest.user.ext).to.not.be.undefined;
expect(ortbRequest.user.ext.eids).to.not.be.undefined;
expect(ortbRequest.user.ext.eids).to.have.lengthOf(6);
expect(ortbRequest.user.ext.eids).to.have.lengthOf(12);
userVerify(ortbRequest.user.ext.eids[0], 'britepool.com', 'britepool_id123');
userVerify(ortbRequest.user.ext.eids[1], 'criteo', 'criteo_id234');
userVerify(ortbRequest.user.ext.eids[2], 'identityLink', 'idl_id123');
userVerify(ortbRequest.user.ext.eids[1], 'criteo.com', 'criteo_id234');
userVerify(ortbRequest.user.ext.eids[2], 'liveramp.com', 'idl_id123');
userVerify(ortbRequest.user.ext.eids[3], 'id5-sync.com', 'id5id_234');
userVerify(ortbRequest.user.ext.eids[4], 'parrable.com', 'parrable_id234');
userVerify(ortbRequest.user.ext.eids[5], 'liveintent.com', 'liveintent_id123');
userVerify(ortbRequest.user.ext.eids[5], 'neustar.biz', 'fabrick_user4');
userVerify(ortbRequest.user.ext.eids[6], 'audigent.com', 'halo_user1');
userVerify(ortbRequest.user.ext.eids[7], 'merkleinc.com', 'merkle_user3');
userVerify(ortbRequest.user.ext.eids[8], 'crwdcntrl.net', 'lotame_user2');
userVerify(ortbRequest.user.ext.eids[9], 'verizonmedia.com', 'connect_user5');
userVerify(ortbRequest.user.ext.eids[10], 'uidapi.com', 'uid2_user6');
userVerify(ortbRequest.user.ext.eids[11], 'liveintent.com', 'liveintent_id123');
});
it('Verify multiple adsizes', function () {
const bidRequests = deepClone(slotConfigs);
Expand Down

0 comments on commit 0490210

Please sign in to comment.