Skip to content

Commit

Permalink
userID: break out EID configuration to individual submodules (#10229)
Browse files Browse the repository at this point in the history
* move eids config to submodules

* update EID logic

* Fix tests
  • Loading branch information
dgirardi authored Jul 14, 2023
1 parent f4664a1 commit 4389768
Show file tree
Hide file tree
Showing 58 changed files with 1,203 additions and 1,295 deletions.
9 changes: 9 additions & 0 deletions modules/33acrossIdSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,15 @@ export const thirthyThreeAcrossIdSubmodule = {
}, calculateQueryStringParams(pid, gdprConsentData), { method: 'GET', withCredentials: true });
}
};
},
eids: {
'33acrossId': {
source: '33across.com',
atype: 1,
getValue: function(data) {
return data.envelope;
}
},
}
};

Expand Down
6 changes: 6 additions & 0 deletions modules/admixerIdSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ export const admixerIdSubmodule = {
};

return { callback: resp };
},
eids: {
'admixerId': {
source: 'admixer.net',
atype: 3
},
}
};
function retrieveVisitorId(url, callback) {
Expand Down
6 changes: 6 additions & 0 deletions modules/adqueryIdSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ export const adqueryIdSubmodule = {
}
};
return {callback: resp};
},
eids: {
'qid': {
source: 'adquery.io',
atype: 1
},
}
};

Expand Down
6 changes: 6 additions & 0 deletions modules/adtelligentIdSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ export const adtelligentIdModule = {
}

}
},
eids: {
'adtelligentId': {
source: 'adtelligent.com',
atype: 3
},
}
};

Expand Down
6 changes: 6 additions & 0 deletions modules/amxIdSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,12 @@ export const amxIdSubmodule = {

return { callback };
},
eids: {
amxId: {
source: 'amxdt.net',
atype: 1,
},
}
};

submodule('userId', amxIdSubmodule);
6 changes: 6 additions & 0 deletions modules/britepoolIdSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,12 @@ export const britepoolIdSubmodule = {
}
}
return valueObj;
},
eids: {
'britepoolid': {
source: 'britepool.com',
atype: 3
},
}
};

Expand Down
6 changes: 6 additions & 0 deletions modules/connectIdSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,12 @@ export const connectIdSubmodule = {
*/
getAjaxFn() {
return ajax;
},
eids: {
'connectId': {
source: 'yahoo.com',
atype: 3
},
}
};

Expand Down
6 changes: 6 additions & 0 deletions modules/criteoIdSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,12 @@ export const criteoIdSubmodule = {
id: localData.bidId ? { criteoId: localData.bidId } : undefined,
callback: result
}
},
eids: {
'criteoId': {
source: 'criteo.com',
atype: 1
},
}
};

Expand Down
6 changes: 6 additions & 0 deletions modules/czechAdIdSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ export const czechAdIdSubmodule = {
getId () {
const id = readId()
return id ? { id: id } : undefined
},
eids: {
'czechAdId': {
source: 'czechadid.cz',
atype: 1
},
}
}

Expand Down
6 changes: 6 additions & 0 deletions modules/dacIdSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,12 @@ export const dacIdSystemSubmodule = {
}

return fetchAoneId(configParams.oid, cookie.fuuid);
},
eids: {
'dacId': {
source: 'impact-ad.jp',
atype: 1
},
}
};

Expand Down
9 changes: 7 additions & 2 deletions modules/deepintentDpesIdSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,13 @@ export const deepintentDpesSubmodule = {
*/
getId(config, consentData, cacheIdObj) {
return cacheIdObj;
}

},
eids: {
'deepintentId': {
source: 'deepintent.com',
atype: 3
},
},
};

submodule('userId', deepintentDpesSubmodule);
6 changes: 6 additions & 0 deletions modules/dmdIdSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ export const dmdIdSubmodule = {
};
return { callback: resp };
}
},
eids: {
'dmdId': {
source: 'hcn.health',
atype: 3
},
}
};

Expand Down
9 changes: 9 additions & 0 deletions modules/euidIdSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,15 @@ export const euidIdSubmodule = {
_logInfo(`EUID getId returned`, result);
return result;
},
eids: {
'euid': {
source: 'euid.eu',
atype: 3,
getValue: function(data) {
return data.id;
}
},
},
};

function decodeImpl(value) {
Expand Down
6 changes: 6 additions & 0 deletions modules/fabrickIdSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,12 @@ export const fabrickIdSubmodule = {
} catch (e) {
logError(`fabrickIdSystem encountered an error`, e);
}
},
eids: {
'fabrickId': {
source: 'neustar.biz',
atype: 1
},
}
};

Expand Down
16 changes: 16 additions & 0 deletions modules/ftrackIdSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,22 @@ export const ftrackIdSubmodule = {
if (usPrivacyVersion == 1 && usPrivacyOptOutSale === 'Y') consentValue = false;

return consentValue;
},
eids: {
'ftrackId': {
source: 'flashtalking.com',
atype: 1,
getValue: function(data) {
let value = '';
if (data && data.ext && data.ext.DeviceID) {
value = data.ext.DeviceID;
}
return value;
},
getUidExt: function(data) {
return data && data.ext;
}
},
}
};

Expand Down
6 changes: 6 additions & 0 deletions modules/gravitoIdSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ export const gravitoIdSystemSubmodule = {
}
return undefined;
},
eids: {
'gravitompId': {
source: 'gravito.net',
atype: 1
},
}
}

submodule('userId', gravitoIdSystemSubmodule);
21 changes: 20 additions & 1 deletion modules/growthCodeIdSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @requires module:modules/userId
*/

import {logError, logInfo, tryAppendQueryString} from '../src/utils.js';
import {logError, logInfo, pick, tryAppendQueryString} from '../src/utils.js';
import {ajax} from '../src/ajax.js';
import { submodule } from '../src/hook.js'
import {getStorageManager} from '../src/storageManager.js';
Expand Down Expand Up @@ -166,6 +166,25 @@ export const growthCodeIdSubmodule = {
}
};
return { callback: resp };
},
eids: {
'growthCodeId': {
getValue: function(data) {
return data.gc_id
},
source: 'growthcode.io',
atype: 1,
getUidExt: function(data) {
const extendedData = pick(data, [
'h1',
'h2',
'h3',
]);
if (Object.keys(extendedData).length) {
return extendedData;
}
}
},
}
};

Expand Down
6 changes: 6 additions & 0 deletions modules/hadronIdSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ export const hadronIdSubmodule = {
ajax(url, callbacks, undefined, {method: 'GET'});
};
return {callback: resp};
},
eids: {
'hadronId': {
source: 'audigent.com',
atype: 1
},
}
};

Expand Down
16 changes: 15 additions & 1 deletion modules/id5IdSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,21 @@ export const id5IdSubmodule = {

logInfo(LOG_PREFIX + 'using cached ID', cacheIdObj);
return cacheIdObj;
}
},
eids: {
'id5id': {
getValue: function(data) {
return data.uid
},
source: 'id5-sync.com',
atype: 1,
getUidExt: function(data) {
if (data.ext) {
return data.ext;
}
}
},
},
};

class IdFetchFlow {
Expand Down
6 changes: 6 additions & 0 deletions modules/identityLinkIdSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ export const identityLinkSubmodule = {
};

return { callback: resp };
},
eids: {
'idl_env': {
source: 'liveramp.com',
atype: 3
},
}
};
// return envelope from third party endpoint
Expand Down
6 changes: 6 additions & 0 deletions modules/idxIdSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ export const idxIdSubmodule = {
}
}
return undefined;
},
eids: {
'idx': {
source: 'idx.lat',
atype: 1
},
}
};
submodule('userId', idxIdSubmodule);
10 changes: 10 additions & 0 deletions modules/imuIdSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,16 @@ export const imuIdSubmodule = {
imppid: localData.ppid
}
};
},
eids: {
'imppid': {
source: 'ppid.intimatemerger.com',
atype: 1
},
'imuid': {
source: 'intimatemerger.com',
atype: 1
},
}
};

Expand Down
6 changes: 6 additions & 0 deletions modules/intentIqIdSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,12 @@ export const intentIqIdSubmodule = {
}
};
return { callback: resp };
},
eids: {
'intentIqId': {
source: 'intentiq.com',
atype: 1
},
}
};

Expand Down
6 changes: 6 additions & 0 deletions modules/justIdSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ export const justIdSubmodule = {
}
}
};
},
eids: {
'justId': {
source: 'justtag.com',
atype: 1
},
}
};

Expand Down
9 changes: 7 additions & 2 deletions modules/kinessoIdSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,13 @@ export const kinessoIdSubmodule = {
const payloadString = JSON.stringify(kinessoIdPayload);
ajax(kinessoSyncUrl(accountId, consentData), syncId(knnsoId), payloadString, {method: 'POST', withCredentials: true});
return {'id': knnsoId};
}

},
eids: {
'kpuid': {
source: 'kpuid.com',
atype: 3
},
},
};

// Register submodule for userId
Expand Down
Loading

0 comments on commit 4389768

Please sign in to comment.