Skip to content

Commit

Permalink
Yahoossp and Aol Bid Adapters: Added epsilon.com user id source (preb…
Browse files Browse the repository at this point in the history
…id#9096)

* Added epsilon.com user id source to yahoossp and aol bid adapters.

* Added epsilon.com user id source to yahoossp and aol bid adapters- unit test.

* Added epsilon.com user id source to yahoossp and aol bid adapters- unit test.

Co-authored-by: dumitrubarbos <[email protected]>
  • Loading branch information
2 people authored and JacobKlein26 committed Feb 8, 2023
1 parent 4dbe737 commit cf4b3a8
Show file tree
Hide file tree
Showing 4 changed files with 113 additions and 12 deletions.
27 changes: 25 additions & 2 deletions modules/aolBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,38 @@ const SYNC_TYPES = {
};

const SUPPORTED_USER_ID_SOURCES = [
'admixer.net',
'adserver.org',
'adtelligent.com',
'akamai.com',
'amxrtb.com',
'audigent.com',
'britepool.com',
'criteo.com',
'crwdcntrl.net',
'deepintent.com',
'epsilon.com',
'hcn.health',
'id5-sync.com',
'idx.lat',
'intentiq.com',
'intimatemerger.com',
'liveintent.com',
'liveramp.com',
'mediawallahscript.com',
'merkleinc.com',
'netid.de',
'neustar.biz',
'nextroll.com',
'novatiq.com',
'parrable.com',
'pubcid.org',
'quantcast.com',
'tapad.com',
'uidapi.com',
'verizonmedia.com',
'liveramp.com',
'yahoo.com'
'yahoo.com',
'zeotap.com'
];

const pubapiTemplate = template`${'host'}/pubapi/3.0/${'network'}/${'placement'}/${'pageid'}/${'sizeid'}/ADTECH;v=2;cmd=bid;cors=yes;alias=${'alias'};misc=${'misc'};${'dynamicParams'}`;
Expand Down
2 changes: 1 addition & 1 deletion modules/yahoosspBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const SUPPORTED_USER_ID_SOURCES = [
'criteo.com',
'crwdcntrl.net',
'deepintent.com',
'epsilon.com',
'hcn.health',
'id5-sync.com',
'idx.lat',
Expand All @@ -46,7 +47,6 @@ const SUPPORTED_USER_ID_SOURCES = [
'parrable.com',
'pubcid.org',
'quantcast.com',
'quantcast.com',
'tapad.com',
'uidapi.com',
'verizonmedia.com',
Expand Down
51 changes: 42 additions & 9 deletions test/spec/modules/aolBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,20 +81,46 @@ describe('AolAdapter', function () {
const ONE_DISPLAY_TTL = 60;
const ONE_MOBILE_TTL = 3600;
const SUPPORTED_USER_ID_SOURCES = {
'adserver.org': '100',
'criteo.com': '200',
'id5-sync.com': '300',
'intentiq.com': '400',
'liveintent.com': '500',
'quantcast.com': '600',
'verizonmedia.com': '700',
'liveramp.com': '800'
'admixer.net': '100',
'adserver.org': '200',
'adtelligent.com': '300',
'amxrtb.com': '500',
'audigent.com': '600',
'britepool.com': '700',
'criteo.com': '800',
'crwdcntrl.net': '900',
'deepintent.com': '1000',
'epsilon.com': '1100',
'hcn.health': '1200',
'id5-sync.com': '1300',
'idx.lat': '1400',
'intentiq.com': '1500',
'intimatemerger.com': '1600',
'liveintent.com': '1700',
'liveramp.com': '1800',
'mediawallahscript.com': '1900',
'netid.de': '2100',
'neustar.biz': '2200',
'pubcid.org': '2600',
'quantcast.com': '2700',
'tapad.com': '2800',
'zeotap.com': '3200'
};

const USER_ID_DATA = {
admixerId: SUPPORTED_USER_ID_SOURCES['admixer.net'],
adtelligentId: SUPPORTED_USER_ID_SOURCES['adtelligent.com'],
amxId: SUPPORTED_USER_ID_SOURCES['amxrtb.com'],
britepoolid: SUPPORTED_USER_ID_SOURCES['britepool.com'],
criteoId: SUPPORTED_USER_ID_SOURCES['criteo.com'],
connectid: SUPPORTED_USER_ID_SOURCES['verizonmedia.com'],
dmdId: SUPPORTED_USER_ID_SOURCES['hcn.health'],
hadronId: SUPPORTED_USER_ID_SOURCES['audigent.com'],
lotamePanoramaId: SUPPORTED_USER_ID_SOURCES['crwdcntrl.net'],
deepintentId: SUPPORTED_USER_ID_SOURCES['deepintent.com'],
fabrickId: SUPPORTED_USER_ID_SOURCES['neustar.biz'],
idl_env: SUPPORTED_USER_ID_SOURCES['liveramp.com'],
IDP: SUPPORTED_USER_ID_SOURCES['zeotap.com'],
lipb: {
lipbid: SUPPORTED_USER_ID_SOURCES['liveintent.com'],
segments: ['100', '200']
Expand All @@ -104,8 +130,15 @@ describe('AolAdapter', function () {
uid: SUPPORTED_USER_ID_SOURCES['id5-sync.com'],
ext: {foo: 'bar'}
},
idx: SUPPORTED_USER_ID_SOURCES['idx.lat'],
imuid: SUPPORTED_USER_ID_SOURCES['intimatemerger.com'],
intentIqId: SUPPORTED_USER_ID_SOURCES['intentiq.com'],
quantcastId: SUPPORTED_USER_ID_SOURCES['quantcast.com']
mwOpenLinkId: SUPPORTED_USER_ID_SOURCES['mediawallahscript.com'],
netId: SUPPORTED_USER_ID_SOURCES['netid.de'],
quantcastId: SUPPORTED_USER_ID_SOURCES['quantcast.com'],
publinkId: SUPPORTED_USER_ID_SOURCES['epsilon.com'],
pubcid: SUPPORTED_USER_ID_SOURCES['pubcid.org'],
tapadId: SUPPORTED_USER_ID_SOURCES['tapad.com']
};

function createCustomBidRequest({bids, params} = {}) {
Expand Down
45 changes: 45 additions & 0 deletions test/spec/modules/yahoosspBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { expect } from 'chai';
import { config } from 'src/config.js';
import { BANNER, VIDEO } from 'src/mediaTypes.js';
import { spec } from 'modules/yahoosspBidAdapter.js';
import {createEidsArray} from '../../../modules/userId/eids';

const DEFAULT_BID_ID = '84ab500420319d';
const DEFAULT_BID_DCN = '2093845709823475';
Expand Down Expand Up @@ -835,6 +836,50 @@ describe('YahooSSP Bid Adapter:', () => {
});
});

describe('User data', () => {
it('should set the allowed sources user eids', () => {
const { validBidRequests, bidderRequest } = generateBuildRequestMock({});
validBidRequests[0].userIdAsEids = createEidsArray({
admixerId: 'admixerId_FROM_USER_ID_MODULE',
adtelligentId: 'adtelligentId_FROM_USER_ID_MODULE',
amxId: 'amxId_FROM_USER_ID_MODULE',
britepoolid: 'britepoolid_FROM_USER_ID_MODULE',
deepintentId: 'deepintentId_FROM_USER_ID_MODULE',
publinkId: 'publinkId_FROM_USER_ID_MODULE',
intentIqId: 'intentIqId_FROM_USER_ID_MODULE',
idl_env: 'idl_env_FROM_USER_ID_MODULE',
imuid: 'imuid_FROM_USER_ID_MODULE',
criteoId: 'criteoId_FROM_USER_ID_MODULE',
fabrickId: 'fabrickId_FROM_USER_ID_MODULE',
});
const data = spec.buildRequests(validBidRequests, bidderRequest).data;

expect(data.user.ext.eids).to.deep.equal([
{source: 'admixer.net', uids: [{id: 'admixerId_FROM_USER_ID_MODULE', atype: 3}]},
{source: 'adtelligent.com', uids: [{id: 'adtelligentId_FROM_USER_ID_MODULE', atype: 3}]},
{source: 'amxrtb.com', uids: [{id: 'amxId_FROM_USER_ID_MODULE', atype: 1}]},
{source: 'britepool.com', uids: [{id: 'britepoolid_FROM_USER_ID_MODULE', atype: 3}]},
{source: 'deepintent.com', uids: [{id: 'deepintentId_FROM_USER_ID_MODULE', atype: 3}]},
{source: 'epsilon.com', uids: [{id: 'publinkId_FROM_USER_ID_MODULE', atype: 3}]},
{source: 'intentiq.com', uids: [{id: 'intentIqId_FROM_USER_ID_MODULE', atype: 1}]},
{source: 'liveramp.com', uids: [{id: 'idl_env_FROM_USER_ID_MODULE', atype: 3}]},
{source: 'intimatemerger.com', uids: [{id: 'imuid_FROM_USER_ID_MODULE', atype: 1}]},
{source: 'criteo.com', uids: [{id: 'criteoId_FROM_USER_ID_MODULE', atype: 1}]},
{source: 'neustar.biz', uids: [{id: 'fabrickId_FROM_USER_ID_MODULE', atype: 1}]}
]);
});

it('should not set not allowed user eids sources', () => {
const { validBidRequests, bidderRequest } = generateBuildRequestMock({});
validBidRequests[0].userIdAsEids = createEidsArray({
justId: 'justId_FROM_USER_ID_MODULE'
});
const data = spec.buildRequests(validBidRequests, bidderRequest).data;

expect(data.user.ext.eids).to.deep.equal([]);
});
});

describe('Request Payload oRTB bid validation:', () => {
it('should generate a valid openRTB bid-request object in the data field', () => {
const { validBidRequests, bidderRequest } = generateBuildRequestMock({});
Expand Down

0 comments on commit cf4b3a8

Please sign in to comment.