Skip to content

Commit

Permalink
OpenX: add new userIds (prebid#7255)
Browse files Browse the repository at this point in the history
  • Loading branch information
bwschmidt authored and agrandes-tappx committed Sep 29, 2021
1 parent d928d51 commit 803a32c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
13 changes: 12 additions & 1 deletion modules/openxBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,15 @@ export const USER_ID_CODE_TO_QUERY_ARG = {
tapadId: 'tapadid', // Tapad Id
tdid: 'ttduuid', // The Trade Desk Unified ID
uid2: 'uid2', // Unified ID 2.0
flocId: 'floc', // Chrome FLoC
flocId: 'floc', // Chrome FLoC,
admixerId: 'admixerid', // AdMixer ID
deepintentId: 'deepintentid', // DeepIntent ID
dmdId: 'dmdid', // DMD Marketing Corp ID
nextrollId: 'nextrollid', // NextRoll ID
novatiq: 'novatiqid', // Novatiq ID
mwOpenLinkId: 'mwopenlinkid', // MediaWallah OpenLink ID
dapId: 'dapid', // Akamai DAP ID
amxId: 'amxid' // AMX RTB ID
};

export const spec = {
Expand Down Expand Up @@ -307,6 +315,9 @@ function appendUserIdsToQueryParams(queryParams, userIds) {
case 'id5id':
queryParams[key] = userIdObjectOrValue.uid;
break;
case 'novatiq':
queryParams[key] = userIdObjectOrValue.snowflake;
break;
default:
queryParams[key] = userIdObjectOrValue;
}
Expand Down
13 changes: 12 additions & 1 deletion test/spec/modules/openxBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,15 @@ describe('OpenxAdapter', function () {
tapadId: '111-tapadid',
tdid: '1111-tdid',
uid2: {id: '1111-uid2'},
flocId: {id: '12144', version: 'chrome.1.1'}
flocId: {id: '12144', version: 'chrome.1.1'},
novatiq: {snowflake: '1111-novatiqid'},
admixerId: '1111-admixerid',
deepintentId: '1111-deepintentid',
dmdId: '111-dmdid',
nextrollId: '1111-nextrollid',
mwOpenLinkId: '1111-mwopenlinkid',
dapId: '1111-dapId',
amxId: '1111-amxid',
};

// generates the same set of tests for each id provider
Expand Down Expand Up @@ -1120,6 +1128,9 @@ describe('OpenxAdapter', function () {
case 'id5id':
userIdValue = EXAMPLE_DATA_BY_ATTR.id5id.uid;
break;
case 'novatiq':
userIdValue = EXAMPLE_DATA_BY_ATTR.novatiq.snowflake;
break;
default:
userIdValue = EXAMPLE_DATA_BY_ATTR[userIdProviderKey];
}
Expand Down

0 comments on commit 803a32c

Please sign in to comment.