Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Liveintent & UID2 ID systems: share EID configuration #10559

Merged
merged 1 commit into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions libraries/uid2Eids/uid2Eids.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
export const UID2_EIDS = {
'uid2': {
source: 'uidapi.com',
atype: 3,
getValue: function(data) {
return data.id;
},
getUidExt: function(data) {
if (data.ext) {
return data.ext;
}
}
}
}
2 changes: 2 additions & 0 deletions modules/liveIntentIdSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { LiveConnect } from 'live-connect-js'; // eslint-disable-line prebid/val
import { gdprDataHandler, uspDataHandler } from '../src/adapterManager.js';
import {getStorageManager} from '../src/storageManager.js';
import {MODULE_TYPE_UID} from '../src/activities/modules.js';
import {UID2_EIDS} from '../libraries/uid2Eids/uid2Eids.js';

const DEFAULT_AJAX_TIMEOUT = 5000
const EVENTS_TOPIC = 'pre_lips'
Expand Down Expand Up @@ -249,6 +250,7 @@ export const liveIntentIdSubmodule = {
return { callback: result };
},
eids: {
...UID2_EIDS,
'lipb': {
getValue: function(data) {
return data.lipbid;
Expand Down
16 changes: 2 additions & 14 deletions modules/uid2IdSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {MODULE_TYPE_UID} from '../src/activities/modules.js';
// RE below lint exception: UID2 and EUID are separate modules, but the protocol is the same and shared code makes sense here.
// eslint-disable-next-line prebid/validate-imports
import { Uid2GetId, Uid2CodeVersion } from './uid2IdSystem_shared.js';
import {UID2_EIDS} from '../libraries/uid2Eids/uid2Eids.js';

const MODULE_NAME = 'uid2';
const MODULE_REVISION = Uid2CodeVersion;
Expand Down Expand Up @@ -83,20 +84,7 @@ export const uid2IdSubmodule = {
_logInfo(`UID2 getId returned`, result);
return result;
},
eids: {
'uid2': {
source: 'uidapi.com',
atype: 3,
getValue: function(data) {
return data.id;
},
getUidExt: function(data) {
if (data.ext) {
return data.ext;
}
}
},
},
eids: UID2_EIDS
};

function decodeImpl(value) {
Expand Down