Skip to content
Closed
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
10 changes: 4 additions & 6 deletions modules/liveIntentIdSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
* @module modules/liveIntentIdSystem
* @requires module:modules/userId
*/
import { triggerPixel, logError } from '../src/utils.js';
import { generateUUID, triggerPixel, logError } from '../src/utils.js';
import { ajaxBuilder } from '../src/ajax.js';
import { submodule } from '../src/hook.js';
import { LiveConnect } from 'live-connect-js/esm/initializer.js';
import { gdprDataHandler, uspDataHandler } from '../src/adapterManager.js';
import { getStorageManager } from '../src/storageManager.js';
import { MinimalLiveConnect } from 'live-connect-js/esm/minimal-live-connect.js';

const MODULE_NAME = 'liveIntentId';
export const storage = getStorageManager({gvlid: null, moduleName: MODULE_NAME});
const defaultRequestedAttributes = {'nonId': true}
const globalVarName = `prebid_liQ_${generateUUID().slice(0, 8)}`
const calls = {
ajaxGet: (url, onSuccess, onError, timeout) => {
ajaxBuilder(timeout)(
Expand Down Expand Up @@ -110,10 +110,11 @@ function initializeLiveConnect(configParams) {
liveConnectConfig.gdprApplies = gdprConsent.gdprApplies;
liveConnectConfig.gdprConsent = gdprConsent.consentString;
}
liveConnectConfig.globalVarName = globalVarName

// The second param is the storage object, LS & Cookie manipulation uses PBJS
// The third param is the ajax and pixel object, the ajax and pixel use PBJS
liveConnect = liveIntentIdSubmodule.getInitializer()(liveConnectConfig, storage, calls);
liveConnect = LiveConnect(liveConnectConfig, storage, calls);
if (configParams.emailHash) {
liveConnect.push({ hash: configParams.emailHash })
}
Expand All @@ -139,9 +140,6 @@ export const liveIntentIdSubmodule = {
setModuleMode(mode) {
this.moduleMode = mode
},
getInitializer() {
return this.moduleMode === 'minimal' ? MinimalLiveConnect : LiveConnect
},

/**
* decode the stored id value for passing to bid requests. Note that lipb object is a wrapper for everything, and
Expand Down
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
"express": "^4.15.4",
"fun-hooks": "^0.9.9",
"just-clone": "^1.0.2",
"live-connect-js": "2.4.0"
"live-connect-js": "3.0.0-alpha.1"
},
"optionalDependencies": {
"fsevents": "^2.3.2"
Expand Down