Skip to content

Commit

Permalink
Lotame panorama id glv (prebid#6185)
Browse files Browse the repository at this point in the history
* Add the root domain check method as a global method added for use modules

* Add a date suffix to keep the test cookie random

* Per review, moved the findRootDomain method to utils out of the userId modules

* More the domain method back the user module but attach it to the submodule so that userId modules can have access to it

* Remove the storageManager as it is no longer used in utils

* Add the GVLID to the lotamePanoramaIdSystem

* Use the GVL ID in the storage manager as well
  • Loading branch information
markaconrad authored and stsepelin committed May 28, 2021
1 parent 48ed19f commit 4a7516e
Showing 1 changed file with 12 additions and 6 deletions.
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

0 comments on commit 4a7516e

Please sign in to comment.