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

Lotame panorama id glv #6185

Merged
merged 9 commits into from
Jan 14, 2021
18 changes: 12 additions & 6 deletions modules/lotamePanoramaIdSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ const MODULE_NAME = 'lotamePanoramaId';
const NINE_MONTHS_MS = 23328000 * 1000;
const DAYS_TO_CACHE = 7;
const DAY_MS = 60 * 60 * 24 * 1000;
const GVLID = 95;

export const storage = getStorageManager(null, MODULE_NAME);
export const storage = getStorageManager(GVLID, MODULE_NAME);

/**
* Set the Lotame First Party Profile ID in the first party namespace
Expand Down Expand Up @@ -141,13 +142,18 @@ function clearLotameCache(key) {
}
/** @type {Submodule} */
export const lotamePanoramaIdSubmodule = {

/**
* used to link submodule with config
* @type {string}
*/
name: MODULE_NAME,

/**
* Vendor id of Lotame
* @type {Number}
*/
gvlid: GVLID,

/**
* Decode the stored id value for passing to bid requests
* @function decode
Expand All @@ -156,7 +162,7 @@ export const lotamePanoramaIdSubmodule = {
* @returns {(Object|undefined)}
*/
decode(value, config) {
return utils.isStr(value) ? { 'lotamePanoramaId': value } : undefined;
return utils.isStr(value) ? { lotamePanoramaId: value } : undefined;
},

/**
Expand All @@ -174,7 +180,7 @@ export const lotamePanoramaIdSubmodule = {

if (!refreshNeeded) {
return {
id: localCache.data
id: localCache.data,
};
}

Expand All @@ -183,7 +189,7 @@ export const lotamePanoramaIdSubmodule = {
const resolveIdFunction = function (callback) {
let queryParams = {};
if (storedUserId) {
queryParams.fp = storedUserId
queryParams.fp = storedUserId;
}

if (consentData && utils.isBoolean(consentData.gdprApplies)) {
Expand Down Expand Up @@ -233,7 +239,7 @@ export const lotamePanoramaIdSubmodule = {
undefined,
{
method: 'GET',
withCredentials: true
withCredentials: true,
}
);
};
Expand Down