Skip to content

Commit

Permalink
LiveIntent UserId module: fix Ajax timeout when calling the collector…
Browse files Browse the repository at this point in the history
… endpoint (#10425)

* Update LiveConnect

* Separate timeout for the collctor

* Update package-lock.json

* Fix package-lock
  • Loading branch information
3link authored Sep 12, 2023
1 parent f54c6e5 commit 779146a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
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

0 comments on commit 779146a

Please sign in to comment.