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 UserId module: fix Ajax timeout when calling the collector endpoint #10425

Merged
merged 5 commits into from
Sep 12, 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
7 changes: 4 additions & 3 deletions modules/liveIntentIdSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { gdprDataHandler, uspDataHandler } from '../src/adapterManager.js';
import {getStorageManager} from '../src/storageManager.js';
import {MODULE_TYPE_UID} from '../src/activities/modules.js';

const DEFAULT_AJAX_TIMEOUT = 5000
const EVENTS_TOPIC = 'pre_lips'
const MODULE_NAME = 'liveIntentId';
const LI_PROVIDER_DOMAIN = 'liveintent.com';
Expand Down Expand Up @@ -65,6 +66,7 @@ function parseLiveIntentCollectorConfig(collectConfig) {
collectConfig.fpiStorageStrategy && (config.storageStrategy = collectConfig.fpiStorageStrategy);
collectConfig.fpiExpirationDays && (config.expirationDays = collectConfig.fpiExpirationDays);
collectConfig.collectorUrl && (config.collectorUrl = collectConfig.collectorUrl);
config.ajaxTimeout = collectConfig.ajaxTimeout || DEFAULT_AJAX_TIMEOUT;
return config;
}

Expand Down Expand Up @@ -99,9 +101,8 @@ function initializeLiveConnect(configParams) {
if (configParams.url) {
identityResolutionConfig.url = configParams.url
}
if (configParams.ajaxTimeout) {
identityResolutionConfig.ajaxTimeout = configParams.ajaxTimeout;
}

identityResolutionConfig.ajaxTimeout = configParams.ajaxTimeout || DEFAULT_AJAX_TIMEOUT;

const liveConnectConfig = parseLiveIntentCollectorConfig(configParams.liCollectConfig);

Expand Down
18 changes: 9 additions & 9 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 @@ -132,7 +132,7 @@
"express": "^4.15.4",
"fun-hooks": "^0.9.9",
"just-clone": "^1.0.2",
"live-connect-js": "^6.0.0"
"live-connect-js": "^6.0.1"
},
"optionalDependencies": {
"fsevents": "^2.3.2"
Expand Down