@pendo/agent 2.285.1 → 2.286.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/debugger-plugin.min.js +1 -1
- package/dist/dom.esm.js +63 -17
- package/dist/pendo.module.js +221 -132
- package/dist/pendo.module.min.js +10 -10
- package/package.json +1 -1
package/dist/pendo.module.js
CHANGED
|
@@ -3522,8 +3522,6 @@ var ConfigReader = (function () {
|
|
|
3522
3522
|
addOption('trainingPartner');
|
|
3523
3523
|
// Frustration
|
|
3524
3524
|
addOption('errorClickLogging', [PENDO_CONFIG_SRC], false);
|
|
3525
|
-
// Internal
|
|
3526
|
-
addOption('forceParentDesigner', [SNIPPET_SRC]); // Only works in non-prod environments for automated testing
|
|
3527
3525
|
// Embedded Guides
|
|
3528
3526
|
addOption('enableAllEmbeddedGuideEvents', [PENDO_CONFIG_SRC], false);
|
|
3529
3527
|
// Form Validation
|
|
@@ -3905,8 +3903,8 @@ var SERVER = '';
|
|
|
3905
3903
|
var ASSET_HOST = '';
|
|
3906
3904
|
var ASSET_PATH = '';
|
|
3907
3905
|
var DESIGNER_SERVER = '';
|
|
3908
|
-
var VERSION = '2.
|
|
3909
|
-
var PACKAGE_VERSION = '2.
|
|
3906
|
+
var VERSION = '2.286.0_';
|
|
3907
|
+
var PACKAGE_VERSION = '2.286.0';
|
|
3910
3908
|
var LOADER = 'xhr';
|
|
3911
3909
|
/* eslint-enable agent-eslint-rules/no-gulp-env-references */
|
|
3912
3910
|
/**
|
|
@@ -4388,6 +4386,21 @@ function createStorageShim(storageAccessor) {
|
|
|
4388
4386
|
var pendoLocalStorage$4 = createStorageShim(function () { return window.localStorage; });
|
|
4389
4387
|
var pendoSessionStorage$2 = createStorageShim(function () { return window.sessionStorage; });
|
|
4390
4388
|
|
|
4389
|
+
/**
|
|
4390
|
+
* Safely deserializes JSON if value is a valid json string.
|
|
4391
|
+
* If the argument is falsy or JSON.parse throws an exception, returns null.
|
|
4392
|
+
*
|
|
4393
|
+
* @param {string} value - The JSON string to parse
|
|
4394
|
+
* @returns {object} | {null} - The parsed object or null if parsing fails
|
|
4395
|
+
*/
|
|
4396
|
+
function SafeJsonDeserializer(value) {
|
|
4397
|
+
try {
|
|
4398
|
+
return JSON.parse(value);
|
|
4399
|
+
}
|
|
4400
|
+
catch (error) {
|
|
4401
|
+
return null;
|
|
4402
|
+
}
|
|
4403
|
+
}
|
|
4391
4404
|
var inMemoryCookies = {};
|
|
4392
4405
|
var cookieDomain;
|
|
4393
4406
|
var areCookiesEnabled = true;
|
|
@@ -4487,11 +4500,11 @@ class StorageRegistry {
|
|
|
4487
4500
|
constructor() {
|
|
4488
4501
|
this.keys = {};
|
|
4489
4502
|
}
|
|
4490
|
-
addLocal(key) {
|
|
4491
|
-
this._add(key, 'local');
|
|
4503
|
+
addLocal(key, config) {
|
|
4504
|
+
this._add(key, 'local', config);
|
|
4492
4505
|
}
|
|
4493
|
-
addSession(key) {
|
|
4494
|
-
this._add(key, 'session');
|
|
4506
|
+
addSession(key, config) {
|
|
4507
|
+
this._add(key, 'session', config);
|
|
4495
4508
|
}
|
|
4496
4509
|
hasLocal(key) {
|
|
4497
4510
|
return this._has(key, 'local');
|
|
@@ -4499,13 +4512,46 @@ class StorageRegistry {
|
|
|
4499
4512
|
hasSession(key) {
|
|
4500
4513
|
return this._has(key, 'session');
|
|
4501
4514
|
}
|
|
4502
|
-
|
|
4515
|
+
getKeyConfig(key, option, override) {
|
|
4516
|
+
if (doesExist(override)) {
|
|
4517
|
+
return override;
|
|
4518
|
+
}
|
|
4519
|
+
if (!this.keys[key]) {
|
|
4520
|
+
return undefined;
|
|
4521
|
+
}
|
|
4522
|
+
return this.keys[key][option];
|
|
4523
|
+
}
|
|
4524
|
+
getKeySerializer(key) {
|
|
4525
|
+
if (!this.keys[key]) {
|
|
4526
|
+
return _.identity;
|
|
4527
|
+
}
|
|
4528
|
+
return this.keys[key].serializer;
|
|
4529
|
+
}
|
|
4530
|
+
getKeyDeserializer(key) {
|
|
4531
|
+
if (!this.keys[key]) {
|
|
4532
|
+
return _.identity;
|
|
4533
|
+
}
|
|
4534
|
+
return this.keys[key].deserializer;
|
|
4535
|
+
}
|
|
4536
|
+
_add(key, type, config = {}) {
|
|
4537
|
+
config = _.extend({
|
|
4538
|
+
type,
|
|
4539
|
+
duration: null,
|
|
4540
|
+
isPlain: false,
|
|
4541
|
+
isSecure: false,
|
|
4542
|
+
cookieSuffix: undefined,
|
|
4543
|
+
serializer: _.identity,
|
|
4544
|
+
deserializer: _.identity
|
|
4545
|
+
}, config);
|
|
4503
4546
|
if (this.keys[key])
|
|
4504
4547
|
return;
|
|
4505
|
-
this.keys[key] =
|
|
4548
|
+
this.keys[key] = config;
|
|
4506
4549
|
}
|
|
4507
4550
|
_has(key, type) {
|
|
4508
|
-
|
|
4551
|
+
if (this.keys[key]) {
|
|
4552
|
+
return this.keys[key].type === type;
|
|
4553
|
+
}
|
|
4554
|
+
return false;
|
|
4509
4555
|
}
|
|
4510
4556
|
}
|
|
4511
4557
|
/*
|
|
@@ -4571,21 +4617,28 @@ var agentStorage = (function () {
|
|
|
4571
4617
|
}
|
|
4572
4618
|
}
|
|
4573
4619
|
// Will always return a string or null
|
|
4620
|
+
// no longer true as a deserializer added for a key will allow for any return value.
|
|
4621
|
+
// maintaining null as a non success return value should be the norm
|
|
4574
4622
|
function read(name, isPlain, cookieSuffix) {
|
|
4623
|
+
isPlain = registry.getKeyConfig(name, 'isPlain', isPlain);
|
|
4624
|
+
cookieSuffix = registry.getKeyConfig(name, 'cookieSuffix', cookieSuffix);
|
|
4625
|
+
let rawValue;
|
|
4575
4626
|
if (canUseLocalStorage()) {
|
|
4576
4627
|
var key = !isPlain ? getPendoCookieKey(name, cookieSuffix) : name;
|
|
4577
|
-
|
|
4578
|
-
if (
|
|
4628
|
+
rawValue = ttlApply(localStorage.getItem(key));
|
|
4629
|
+
if (rawValue === null) {
|
|
4579
4630
|
clear(name, isPlain, cookieSuffix);
|
|
4580
4631
|
}
|
|
4581
|
-
return val;
|
|
4582
|
-
}
|
|
4583
|
-
if (!isPlain) {
|
|
4584
|
-
return get_pendo_cookie(name, cookieSuffix);
|
|
4585
4632
|
}
|
|
4586
4633
|
else {
|
|
4587
|
-
|
|
4634
|
+
if (!isPlain) {
|
|
4635
|
+
rawValue = get_pendo_cookie(name, cookieSuffix);
|
|
4636
|
+
}
|
|
4637
|
+
else {
|
|
4638
|
+
rawValue = getCookie(name);
|
|
4639
|
+
}
|
|
4588
4640
|
}
|
|
4641
|
+
return registry.getKeyDeserializer(name)(rawValue);
|
|
4589
4642
|
}
|
|
4590
4643
|
function ttlApply(value) {
|
|
4591
4644
|
if (value === null)
|
|
@@ -4608,6 +4661,11 @@ var agentStorage = (function () {
|
|
|
4608
4661
|
}
|
|
4609
4662
|
// consider assert type of val (what do we support? string, number, boolean? )
|
|
4610
4663
|
function write(name, val, duration, isPlain, isSecure, cookieSuffix) {
|
|
4664
|
+
duration = registry.getKeyConfig(name, 'duration', duration);
|
|
4665
|
+
isPlain = registry.getKeyConfig(name, 'isPlain', isPlain);
|
|
4666
|
+
isSecure = registry.getKeyConfig(name, 'isSecure', isSecure);
|
|
4667
|
+
cookieSuffix = registry.getKeyConfig(name, 'cookieSuffix', cookieSuffix);
|
|
4668
|
+
val = registry.getKeySerializer(name)(val);
|
|
4611
4669
|
resetCache(storageAvailable);
|
|
4612
4670
|
if (canUseLocalStorage()) {
|
|
4613
4671
|
// We'll try to write but if that fails, just fall down to cookies.
|
|
@@ -4637,6 +4695,8 @@ var agentStorage = (function () {
|
|
|
4637
4695
|
});
|
|
4638
4696
|
}
|
|
4639
4697
|
function clear(name, isPlain, cookieSuffix) {
|
|
4698
|
+
isPlain = registry.getKeyConfig(name, 'isPlain', isPlain);
|
|
4699
|
+
cookieSuffix = registry.getKeyConfig(name, 'cookieSuffix', cookieSuffix);
|
|
4640
4700
|
var key = !isPlain ? getPendoCookieKey(name, cookieSuffix) : name;
|
|
4641
4701
|
if (canUseLocalStorage()) {
|
|
4642
4702
|
return localStorage.removeItem(key);
|
|
@@ -11703,12 +11763,6 @@ var detectMaster = function () {
|
|
|
11703
11763
|
};
|
|
11704
11764
|
var getDesignerWindow = function () {
|
|
11705
11765
|
var isPendo = new RegExp('^' + escapeRegExp(HOST).replace(/^https?:/, 'https?:'));
|
|
11706
|
-
// If we are not in production then we will allow the config to force
|
|
11707
|
-
// the designer window to just be parent instead of top. This is there
|
|
11708
|
-
// to make cypress testing of Classic Designer (P1) work.
|
|
11709
|
-
var forceParentDesigner = ConfigReader.get('forceParentDesigner');
|
|
11710
|
-
if (!isProdAgent() && forceParentDesigner)
|
|
11711
|
-
return window.parent;
|
|
11712
11766
|
// If the agent is running in a Pendo app instance, talk to the
|
|
11713
11767
|
// parent window to enable "inception mode", otherwise talk
|
|
11714
11768
|
// directly to the top window.
|
|
@@ -11999,8 +12053,8 @@ class SendQueue {
|
|
|
11999
12053
|
return failureCount;
|
|
12000
12054
|
}
|
|
12001
12055
|
pass(payload, dequeue = true) {
|
|
12002
|
-
this.unloads
|
|
12003
|
-
this.pending
|
|
12056
|
+
this.unloads.delete(payload);
|
|
12057
|
+
this.pending.delete(payload);
|
|
12004
12058
|
this.failures.clear();
|
|
12005
12059
|
const index = this.queue.indexOf(payload);
|
|
12006
12060
|
if (index >= 0) {
|
|
@@ -12011,8 +12065,8 @@ class SendQueue {
|
|
|
12011
12065
|
}
|
|
12012
12066
|
}
|
|
12013
12067
|
fail(payload, retry = true) {
|
|
12014
|
-
this.unloads
|
|
12015
|
-
this.pending
|
|
12068
|
+
this.unloads.delete(payload);
|
|
12069
|
+
this.pending.delete(payload);
|
|
12016
12070
|
const failureCount = this.incrementFailure(payload);
|
|
12017
12071
|
if (this.stopped || !retry)
|
|
12018
12072
|
return;
|
|
@@ -14405,7 +14459,7 @@ var ContentLoader = (function (pendo) {
|
|
|
14405
14459
|
log.critical(new Error('Response from the guide was not in proper JSON format'));
|
|
14406
14460
|
entry.deferred.domJson.reject();
|
|
14407
14461
|
}
|
|
14408
|
-
})
|
|
14462
|
+
}).catch(function (e) {
|
|
14409
14463
|
log.critical(e);
|
|
14410
14464
|
Events.resourceFetchFail.trigger(contentContainer, e);
|
|
14411
14465
|
entry.deferred.domJson.reject('Failed to load content');
|
|
@@ -14642,7 +14696,7 @@ var AsyncContent = (function () {
|
|
|
14642
14696
|
return q.all(_.map(toProcess, (tuple) => {
|
|
14643
14697
|
return AsyncContent.fetchContent(tuple[1]).then((resolution) => {
|
|
14644
14698
|
tuple[0].resolve(resolution);
|
|
14645
|
-
})
|
|
14699
|
+
}).catch((rejection) => {
|
|
14646
14700
|
tuple[0].reject(rejection);
|
|
14647
14701
|
});
|
|
14648
14702
|
}));
|
|
@@ -15247,7 +15301,7 @@ var BuildingBlockTemplates = (function () {
|
|
|
15247
15301
|
delete listItem.templateChildren;
|
|
15248
15302
|
listItem.props.id = listItem.props.id + '-' + index;
|
|
15249
15303
|
listItem.props['data-pendo-show-guide-id'] = guide.id;
|
|
15250
|
-
listItem.props
|
|
15304
|
+
listItem.props.class += ' pendo-task-list-item';
|
|
15251
15305
|
if (!listItem.actions)
|
|
15252
15306
|
listItem.actions = [];
|
|
15253
15307
|
var listItemAction = {
|
|
@@ -15376,7 +15430,7 @@ var BuildingBlockTemplates = (function () {
|
|
|
15376
15430
|
miniBubble.props.style.top = guideTopPadding + containerTopPadding + 5 + 'px';
|
|
15377
15431
|
}
|
|
15378
15432
|
if (!BuildingBlockResourceCenter.hasAnnouncementBeenSeen(guide) && miniBubble) {
|
|
15379
|
-
listItem.props
|
|
15433
|
+
listItem.props.class += ' pendo-unseen-announcement';
|
|
15380
15434
|
listItem.children.unshift(miniBubble);
|
|
15381
15435
|
}
|
|
15382
15436
|
delete listItem.templateName;
|
|
@@ -15402,7 +15456,7 @@ var BuildingBlockTemplates = (function () {
|
|
|
15402
15456
|
miniBubble.props.style.top = '20px';
|
|
15403
15457
|
}
|
|
15404
15458
|
if (!BuildingBlockResourceCenter.hasAnnouncementBeenSeen(guide) && miniBubble) {
|
|
15405
|
-
listItem.props
|
|
15459
|
+
listItem.props.class += ' pendo-unseen-announcement';
|
|
15406
15460
|
listItem.children = [miniBubble];
|
|
15407
15461
|
}
|
|
15408
15462
|
var listItemContainer = buildNodeFromJSON(listItem, announcementStep);
|
|
@@ -17967,7 +18021,7 @@ var updateVisitorOptions = function (options = {}) {
|
|
|
17967
18021
|
* @category Identity
|
|
17968
18022
|
* @param {object} options new metadata to set in the agent
|
|
17969
18023
|
* @example
|
|
17970
|
-
* pendo.updateOptions( { visitor: {"role":"admin"}
|
|
18024
|
+
* pendo.updateOptions( { visitor: { "role":"admin" } , account: { "industry":"retail" } });
|
|
17971
18025
|
*/
|
|
17972
18026
|
var updateOptions = makeSafe(function (options) {
|
|
17973
18027
|
var changedOptions = updateVisitorOptions(options);
|
|
@@ -18348,7 +18402,7 @@ var BuildingBlockResourceCenter = (function () {
|
|
|
18348
18402
|
// Assign all modules for the RC on to the RC
|
|
18349
18403
|
resourceCenter.modules = resourceCenterModules;
|
|
18350
18404
|
resourceCenter.badgeHidden = true;
|
|
18351
|
-
return q.all(promises)
|
|
18405
|
+
return q.all(promises).catch(() => {
|
|
18352
18406
|
resourceCenter = null;
|
|
18353
18407
|
log.error('Failed to load one or more Resource Center modules');
|
|
18354
18408
|
return q.resolve();
|
|
@@ -20850,7 +20904,7 @@ class UpdateRunner {
|
|
|
20850
20904
|
}
|
|
20851
20905
|
}, this);
|
|
20852
20906
|
this.paused = true;
|
|
20853
|
-
promise.then(resume)
|
|
20907
|
+
promise.then(resume).catch(resume);
|
|
20854
20908
|
}
|
|
20855
20909
|
else if (currentPhase.isComplete()) {
|
|
20856
20910
|
this.queue.shift();
|
|
@@ -20985,7 +21039,7 @@ function Wrappable() {
|
|
|
20985
21039
|
var debugEnabled = 'debug-enabled';
|
|
20986
21040
|
function getDebuggingStorage() {
|
|
20987
21041
|
try {
|
|
20988
|
-
const debuggingStorage =
|
|
21042
|
+
const debuggingStorage = agentStorage.read(debugEnabled) || JSON.parse(getCookie(debugEnabled));
|
|
20989
21043
|
if (typeof debuggingStorage === 'boolean') { // v1 debugger storage format
|
|
20990
21044
|
return { enabled: debuggingStorage };
|
|
20991
21045
|
}
|
|
@@ -22007,7 +22061,7 @@ function checkForGuidePreviewError(activeStep, currentStepIndex, previewFrame) {
|
|
|
22007
22061
|
errors
|
|
22008
22062
|
}
|
|
22009
22063
|
}, location.origin);
|
|
22010
|
-
})
|
|
22064
|
+
}).catch(_.noop);
|
|
22011
22065
|
}
|
|
22012
22066
|
function exitPreviewMode(designerConfig) {
|
|
22013
22067
|
var currentPreviewGuideConfig = findStoredDesignerPreviewConfig();
|
|
@@ -22188,7 +22242,7 @@ function previewGuideRequest(config, id) {
|
|
|
22188
22242
|
lastGuideStepSeen: preparePreviewLastGuideStepSeen(guidesArray, pendo$1.lastGuideStepSeen),
|
|
22189
22243
|
guides: preparePreviewGuides(guidesArray)
|
|
22190
22244
|
});
|
|
22191
|
-
})
|
|
22245
|
+
}).catch(function (result) {
|
|
22192
22246
|
sendPreviewModeFailureMessage(document, result);
|
|
22193
22247
|
// passthrough rejections to subscribers
|
|
22194
22248
|
return q.reject(result);
|
|
@@ -23619,8 +23673,6 @@ function onTurbolinksPageLoad(document, onPageLoad, beforeTurboCache) {
|
|
|
23619
23673
|
|
|
23620
23674
|
var EMPTY_ARRAY_JZB = 'eJwFwIEIAAAAwDDQd3-N1QABFQC5';
|
|
23621
23675
|
var AD_BLOCK_STORAGE_KEY = 'guides_blocked';
|
|
23622
|
-
var BLOCKED_STORAGE_DURATION = 1800000; // 30 minutes
|
|
23623
|
-
var NOT_BLOCKED_STORAGE_DURATION = 14400000; // 4 hours
|
|
23624
23676
|
var GUIDE_GIF_BLOCKED = '1';
|
|
23625
23677
|
var GUIDE_GIF_NOT_BLOCKED = '0';
|
|
23626
23678
|
var GUIDE_GIF_BLOCKED_MSG = 'Guides disabled: unreachable endpoint guide.gif';
|
|
@@ -23632,11 +23684,11 @@ function setGuidesBlocked(testGuideGifResult) {
|
|
|
23632
23684
|
if (testGuideGifResult.cached)
|
|
23633
23685
|
return;
|
|
23634
23686
|
if (testGuideGifResult.success) {
|
|
23635
|
-
agentStorage.write(AD_BLOCK_STORAGE_KEY, GUIDE_GIF_NOT_BLOCKED
|
|
23687
|
+
agentStorage.write(AD_BLOCK_STORAGE_KEY, GUIDE_GIF_NOT_BLOCKED);
|
|
23636
23688
|
}
|
|
23637
23689
|
else {
|
|
23638
23690
|
log.info(GUIDE_GIF_BLOCKED_MSG);
|
|
23639
|
-
agentStorage.write(AD_BLOCK_STORAGE_KEY, GUIDE_GIF_BLOCKED
|
|
23691
|
+
agentStorage.write(AD_BLOCK_STORAGE_KEY, GUIDE_GIF_BLOCKED);
|
|
23640
23692
|
}
|
|
23641
23693
|
}
|
|
23642
23694
|
function testGuideGifEndpoint(loader, apiKey) {
|
|
@@ -24787,8 +24839,8 @@ var getNextStepInMultistep = function (lastSeen, urlToCheck) {
|
|
|
24787
24839
|
return currentGuide.nextStep(lastSeen, urlToCheck || getNormalizedUrl());
|
|
24788
24840
|
};
|
|
24789
24841
|
/**
|
|
24790
|
-
* Returns the normalized URL sent from the backend with the guides payload. This won
|
|
24791
|
-
* match the desired output from the customer
|
|
24842
|
+
* Returns the normalized URL sent from the backend with the guides payload. This won't always
|
|
24843
|
+
* match the desired output from the customer's url customizations if using location API.
|
|
24792
24844
|
*
|
|
24793
24845
|
* @access public
|
|
24794
24846
|
* @alias getCurrentUrl
|
|
@@ -25207,7 +25259,7 @@ var loadGuides = function (apiKey, visitorId, page, callback) {
|
|
|
25207
25259
|
pendo$1.eventProperties = createEventPropertiesFromFeatures(pendo$1.features);
|
|
25208
25260
|
let globalJsPromise = q.resolve();
|
|
25209
25261
|
if (pendo$1.globalJsUrl) {
|
|
25210
|
-
globalJsPromise = loadGlobalScriptOnce(replaceWithContentHost(pendo$1.globalJsUrl))
|
|
25262
|
+
globalJsPromise = loadGlobalScriptOnce(replaceWithContentHost(pendo$1.globalJsUrl)).catch(function (err) {
|
|
25211
25263
|
log.error('Error loading global script: ', err);
|
|
25212
25264
|
});
|
|
25213
25265
|
}
|
|
@@ -25243,7 +25295,7 @@ var loadGuides = function (apiKey, visitorId, page, callback) {
|
|
|
25243
25295
|
deferred.resolve();
|
|
25244
25296
|
}
|
|
25245
25297
|
}
|
|
25246
|
-
})
|
|
25298
|
+
}).catch(function (err) {
|
|
25247
25299
|
Events.guidesFailed.trigger();
|
|
25248
25300
|
deferred.reject(err);
|
|
25249
25301
|
});
|
|
@@ -25570,7 +25622,7 @@ var initGuides = function () {
|
|
|
25570
25622
|
* @access public
|
|
25571
25623
|
* @label AD_BLOCK_STORAGE_KEY
|
|
25572
25624
|
*/
|
|
25573
|
-
agentStorage.registry.addLocal(AD_BLOCK_STORAGE_KEY);
|
|
25625
|
+
agentStorage.registry.addLocal(AD_BLOCK_STORAGE_KEY, { duration: 14400000 }); // 4 hours default duration
|
|
25574
25626
|
GuideRuntime.initialize();
|
|
25575
25627
|
return () => {
|
|
25576
25628
|
reloadGuides.reset();
|
|
@@ -25738,7 +25790,7 @@ function reloadGuides(url) {
|
|
|
25738
25790
|
reloadGuides.lastVisitorId = visitorId;
|
|
25739
25791
|
reloadGuides.lastAccountId = accountId;
|
|
25740
25792
|
reloadGuides.lastMetadataHash = metadataHash;
|
|
25741
|
-
loadGuides(pendo$1.apiKey, visitorId, url)
|
|
25793
|
+
loadGuides(pendo$1.apiKey, visitorId, url).catch(_.noop);
|
|
25742
25794
|
}
|
|
25743
25795
|
reloadGuides.reset = function () {
|
|
25744
25796
|
_.each(['lastUrl', 'lastVisitorId', 'lastAccountId', 'lastMetadataHash'], function (prop) {
|
|
@@ -26935,7 +26987,12 @@ const initialize = makeSafe(function (options) {
|
|
|
26935
26987
|
return initialize();
|
|
26936
26988
|
});
|
|
26937
26989
|
}
|
|
26938
|
-
|
|
26990
|
+
try {
|
|
26991
|
+
store.dispatch('location/init', options.location || {});
|
|
26992
|
+
}
|
|
26993
|
+
catch (e) {
|
|
26994
|
+
log.critical('Location API Exception', e);
|
|
26995
|
+
}
|
|
26939
26996
|
// Save the options somewhere
|
|
26940
26997
|
ConfigReader.setLocalConfig(options);
|
|
26941
26998
|
initDataHost();
|
|
@@ -27003,15 +27060,14 @@ const initialize = makeSafe(function (options) {
|
|
|
27003
27060
|
*/
|
|
27004
27061
|
agentStorage.registry.addLocal(OPTIONS_HASH_KEY_NAME);
|
|
27005
27062
|
/**
|
|
27006
|
-
*
|
|
27007
|
-
* used settings, either on the next time it is opened or after a page refresh.
|
|
27063
|
+
* Stores debugging configuration and state for the Pendo debugger.
|
|
27008
27064
|
*
|
|
27009
27065
|
* @name debug-enabled
|
|
27010
27066
|
* @category Cookies/localStorage
|
|
27011
27067
|
* @access public
|
|
27012
27068
|
* @label debugEnabled
|
|
27013
27069
|
*/
|
|
27014
|
-
agentStorage.registry.addLocal(debugEnabled);
|
|
27070
|
+
agentStorage.registry.addLocal(debugEnabled, { isPlain: true, serializer: JSON.stringify, deserializer: SafeJsonDeserializer });
|
|
27015
27071
|
// Disable content pre-fetch for guide center
|
|
27016
27072
|
pendo$1.disableGuideCenterContentSearch = options.disableGuideCenterContentSearch;
|
|
27017
27073
|
// Register handlers passed through pendo_options
|
|
@@ -27867,7 +27923,7 @@ var enableLogging = function () {
|
|
|
27867
27923
|
if (logOverride) {
|
|
27868
27924
|
return 'logging already enabled';
|
|
27869
27925
|
}
|
|
27870
|
-
agentStorage.write(LOG_ENABLED, 'true'
|
|
27926
|
+
agentStorage.write(LOG_ENABLED, 'true');
|
|
27871
27927
|
logOverride = true;
|
|
27872
27928
|
return 'logging enabled';
|
|
27873
27929
|
};
|
|
@@ -27883,7 +27939,7 @@ var disableLogging = function () {
|
|
|
27883
27939
|
if (!logOverride) {
|
|
27884
27940
|
return 'logging already disabled';
|
|
27885
27941
|
}
|
|
27886
|
-
agentStorage.write(LOG_ENABLED, 'false'
|
|
27942
|
+
agentStorage.write(LOG_ENABLED, 'false');
|
|
27887
27943
|
logOverride = false;
|
|
27888
27944
|
return 'logging disabled';
|
|
27889
27945
|
};
|
|
@@ -27900,7 +27956,7 @@ function initLogging() {
|
|
|
27900
27956
|
* @access public
|
|
27901
27957
|
* @label LOG_ENABLED
|
|
27902
27958
|
*/
|
|
27903
|
-
agentStorage.registry.addLocal(LOG_ENABLED);
|
|
27959
|
+
agentStorage.registry.addLocal(LOG_ENABLED, { isPlain: true });
|
|
27904
27960
|
/**
|
|
27905
27961
|
* DEPRECATED: Stores the active contexts for logging.
|
|
27906
27962
|
*
|
|
@@ -27909,7 +27965,7 @@ function initLogging() {
|
|
|
27909
27965
|
* @access private
|
|
27910
27966
|
* @label ACTIVE_CONTEXTS
|
|
27911
27967
|
*/
|
|
27912
|
-
agentStorage.registry.addLocal(ACTIVE_CONTEXTS);
|
|
27968
|
+
agentStorage.registry.addLocal(ACTIVE_CONTEXTS, { isPlain: true });
|
|
27913
27969
|
}
|
|
27914
27970
|
var createContexts = function (contexts, args) {
|
|
27915
27971
|
return _.compact([].concat(contexts, args));
|
|
@@ -27989,7 +28045,7 @@ var getActiveContexts = function () {
|
|
|
27989
28045
|
};
|
|
27990
28046
|
var setActiveContexts = function (contexts) {
|
|
27991
28047
|
activeContexts = createContexts(contexts);
|
|
27992
|
-
agentStorage.write(ACTIVE_CONTEXTS, activeContexts.join(',')
|
|
28048
|
+
agentStorage.write(ACTIVE_CONTEXTS, activeContexts.join(','));
|
|
27993
28049
|
};
|
|
27994
28050
|
var doConsoleLog = function (msg, prefix) {
|
|
27995
28051
|
if (!canWeLog())
|
|
@@ -28610,8 +28666,8 @@ UrlAttrTransform.fromJSON = function (obj) {
|
|
|
28610
28666
|
}
|
|
28611
28667
|
// Validate data types for specific actions
|
|
28612
28668
|
if (obj.action === 'AllowOnlyKeys' || obj.action === 'ExcludeKeys') {
|
|
28613
|
-
if (!_.isArray(obj.data)) {
|
|
28614
|
-
throw new Error('Action "' + obj.action + '" requires "data" to be an array of strings. Example: {attr: "' + obj.attr + '", action: "' + obj.action + '", data: ["key1", "key2"]}');
|
|
28669
|
+
if (!_.isArray(obj.data) && !_.isFunction(obj.data)) {
|
|
28670
|
+
throw new Error('Action "' + obj.action + '" requires "data" to be an array of strings or a function returning an array of strings. Example: {attr: "' + obj.attr + '", action: "' + obj.action + '", data: ["key1", "key2"]}');
|
|
28615
28671
|
}
|
|
28616
28672
|
}
|
|
28617
28673
|
if (obj.action === 'AddTo') {
|
|
@@ -30476,8 +30532,8 @@ function GuideStep(guide) {
|
|
|
30476
30532
|
return;
|
|
30477
30533
|
}
|
|
30478
30534
|
var showPromise = GuideDisplay.show(step, reason);
|
|
30479
|
-
if (showPromise && showPromise
|
|
30480
|
-
showPromise
|
|
30535
|
+
if (showPromise && showPromise.catch) {
|
|
30536
|
+
showPromise.catch(_.noop);
|
|
30481
30537
|
}
|
|
30482
30538
|
return showPromise;
|
|
30483
30539
|
};
|
|
@@ -31260,7 +31316,7 @@ var FramesModule = (function () {
|
|
|
31260
31316
|
if (step) {
|
|
31261
31317
|
var showLocalPromise = GuideDisplay.showLocal(step, payload.reason);
|
|
31262
31318
|
if (isPromise(showLocalPromise)) {
|
|
31263
|
-
showLocalPromise.then(afterShowLocal)
|
|
31319
|
+
showLocalPromise.then(afterShowLocal).catch(_.noop);
|
|
31264
31320
|
}
|
|
31265
31321
|
else {
|
|
31266
31322
|
afterShowLocal(showLocalPromise);
|
|
@@ -32561,7 +32617,7 @@ const DebuggerModule = (() => {
|
|
|
32561
32617
|
});
|
|
32562
32618
|
});
|
|
32563
32619
|
q.all(framePromises).then(results => results)
|
|
32564
|
-
.then((results) => response(results))
|
|
32620
|
+
.then((results) => response(results)).catch((error) => response({ error }));
|
|
32565
32621
|
}
|
|
32566
32622
|
};
|
|
32567
32623
|
const getters = {};
|
|
@@ -33394,10 +33450,10 @@ var PromoteMetadata = (function () {
|
|
|
33394
33450
|
* @access public
|
|
33395
33451
|
* @label SCHEMA_GROUP
|
|
33396
33452
|
*/
|
|
33397
|
-
pluginApi.agentStorage.registry.addLocal(SCHEMA_GROUP);
|
|
33453
|
+
pluginApi.agentStorage.registry.addLocal(SCHEMA_GROUP, { isSecure: true, serializer: JSON.stringify, deserializer: SafeJsonDeserializer });
|
|
33398
33454
|
if (shouldPersist()) {
|
|
33399
33455
|
try {
|
|
33400
|
-
cachedSchemaGroup =
|
|
33456
|
+
cachedSchemaGroup = pluginApi.agentStorage.read(SCHEMA_GROUP);
|
|
33401
33457
|
}
|
|
33402
33458
|
catch (e) {
|
|
33403
33459
|
resetCachedSchemaGroup();
|
|
@@ -33455,7 +33511,7 @@ var PromoteMetadata = (function () {
|
|
|
33455
33511
|
if (shouldPersist()) {
|
|
33456
33512
|
try {
|
|
33457
33513
|
const storedSchemaGroup = pluginApi.agentStorage.read(SCHEMA_GROUP);
|
|
33458
|
-
cachedSchemaGroup = storedSchemaGroup
|
|
33514
|
+
cachedSchemaGroup = storedSchemaGroup;
|
|
33459
33515
|
cachedSchemaGroup = removePrefixes(cachedSchemaGroup);
|
|
33460
33516
|
}
|
|
33461
33517
|
catch (e) {
|
|
@@ -33480,7 +33536,7 @@ var PromoteMetadata = (function () {
|
|
|
33480
33536
|
}
|
|
33481
33537
|
});
|
|
33482
33538
|
if (shouldPersist()) {
|
|
33483
|
-
pluginApi.agentStorage.write(SCHEMA_GROUP,
|
|
33539
|
+
pluginApi.agentStorage.write(SCHEMA_GROUP, __sg__);
|
|
33484
33540
|
}
|
|
33485
33541
|
return __sg__;
|
|
33486
33542
|
}
|
|
@@ -34578,7 +34634,7 @@ function LauncherElement(config) {
|
|
|
34578
34634
|
var element = dom(target).closest(selector);
|
|
34579
34635
|
if (element.length) {
|
|
34580
34636
|
if (isLauncherVisible()) {
|
|
34581
|
-
agentStorage.write(LAUNCHER_CLOSED, 'yes'
|
|
34637
|
+
agentStorage.write(LAUNCHER_CLOSED, 'yes');
|
|
34582
34638
|
}
|
|
34583
34639
|
else {
|
|
34584
34640
|
pendo$1.guideWidget.position(target);
|
|
@@ -35266,7 +35322,7 @@ var initLauncherPlugin = function (pendo, PluginAPI) {
|
|
|
35266
35322
|
* @access public
|
|
35267
35323
|
* @label LAUNCHER_CLOSED
|
|
35268
35324
|
*/
|
|
35269
|
-
PluginAPI.agentStorage.registry.addLocal(LAUNCHER_CLOSED);
|
|
35325
|
+
PluginAPI.agentStorage.registry.addLocal(LAUNCHER_CLOSED, { duration: 10 * 24 * 60 * 60 * 1000 }); // 10 days default duration
|
|
35270
35326
|
};
|
|
35271
35327
|
var teardownLauncherPlugin = function (pendo, PluginAPI) {
|
|
35272
35328
|
deregisterLoadGuideJobs(loadLauncherContentHandler);
|
|
@@ -36045,7 +36101,7 @@ function enableDebugging(andChain) {
|
|
|
36045
36101
|
return;
|
|
36046
36102
|
const debugging = getDebuggingStorage();
|
|
36047
36103
|
debugging.enabled = true;
|
|
36048
|
-
agentStorage.write(debugEnabled,
|
|
36104
|
+
agentStorage.write(debugEnabled, debugging);
|
|
36049
36105
|
startDebuggingModuleIfEnabled();
|
|
36050
36106
|
if (andChain) {
|
|
36051
36107
|
return debugging;
|
|
@@ -36067,7 +36123,7 @@ function disableDebugging() {
|
|
|
36067
36123
|
store.commit('debugger/debuggingEnabled', false);
|
|
36068
36124
|
const debugging = getDebuggingStorage();
|
|
36069
36125
|
debugging.enabled = false;
|
|
36070
|
-
agentStorage.write(debugEnabled,
|
|
36126
|
+
agentStorage.write(debugEnabled, debugging);
|
|
36071
36127
|
pendo$1.debugging = null;
|
|
36072
36128
|
delete pendo$1.debugging;
|
|
36073
36129
|
dom('#pendo-client-debugger').remove();
|
|
@@ -36830,9 +36886,11 @@ class SessionManager {
|
|
|
36830
36886
|
this.api = PluginAPI;
|
|
36831
36887
|
this.pendo = pendo;
|
|
36832
36888
|
this.subscriptions = [
|
|
36889
|
+
this.api.attachEvent(this.api.Events, 'identify', _.bind(this.changeIdentity, this)),
|
|
36833
36890
|
this.api.attachEvent(this.api.Events, 'eventCaptured', _.bind(this.eventCaptured, this))
|
|
36834
36891
|
];
|
|
36835
36892
|
this.inactivityDuration = this.api.ConfigReader.get('inactivityDuration', THIRTY_MINUTES);
|
|
36893
|
+
this.suffix = this.api.ConfigReader.get('identityStorageSuffix');
|
|
36836
36894
|
/**
|
|
36837
36895
|
* Randomly generated string that identifies a session. This is similar to `pendo_tabId`,
|
|
36838
36896
|
* but identifies the entire browser, rather than individual tabs.
|
|
@@ -36842,8 +36900,17 @@ class SessionManager {
|
|
|
36842
36900
|
* @access public
|
|
36843
36901
|
* @label SESSION_ID
|
|
36844
36902
|
*/
|
|
36845
|
-
this.api.agentStorage.registry.addLocal(SESSION_ID);
|
|
36846
|
-
|
|
36903
|
+
this.api.agentStorage.registry.addLocal(SESSION_ID, { cookieSuffix: this.suffix, isSecure: true });
|
|
36904
|
+
}
|
|
36905
|
+
changeIdentity(identifyEvent) {
|
|
36906
|
+
if (!identifyEvent || !identifyEvent.data || !identifyEvent.data.length)
|
|
36907
|
+
return;
|
|
36908
|
+
const { visitor_id, old_visitor_id } = identifyEvent.data[0];
|
|
36909
|
+
if (visitor_id !== old_visitor_id &&
|
|
36910
|
+
!this.pendo.isAnonymousVisitor(visitor_id) &&
|
|
36911
|
+
!this.pendo.isAnonymousVisitor(old_visitor_id)) {
|
|
36912
|
+
this.expireSession();
|
|
36913
|
+
}
|
|
36847
36914
|
}
|
|
36848
36915
|
teardown() {
|
|
36849
36916
|
_.each(this.subscriptions, function (unsubscribe) {
|
|
@@ -36858,40 +36925,46 @@ class SessionManager {
|
|
|
36858
36925
|
}
|
|
36859
36926
|
return false;
|
|
36860
36927
|
}
|
|
36928
|
+
expireSession() {
|
|
36929
|
+
const newSessionInfo = this.clearSessionInfo();
|
|
36930
|
+
this.api.Events.sessionChanged.trigger(newSessionInfo);
|
|
36931
|
+
return newSessionInfo;
|
|
36932
|
+
}
|
|
36861
36933
|
eventCaptured(event) {
|
|
36862
36934
|
if (!event || !event.data || !event.data.length)
|
|
36863
36935
|
return;
|
|
36864
36936
|
var capturedEvent = event.data[0];
|
|
36865
36937
|
const eventTime = capturedEvent.browser_time || new Date().getTime();
|
|
36866
36938
|
let sessionInfo = this.sessionInfo();
|
|
36867
|
-
if (
|
|
36868
|
-
|
|
36869
|
-
|
|
36870
|
-
|
|
36939
|
+
if (capturedEvent.hasUserInteraction || capturedEvent.type !== 'recording') {
|
|
36940
|
+
if (this.isExpired(sessionInfo, eventTime)) {
|
|
36941
|
+
// the current event will be attributed to the *new* session
|
|
36942
|
+
sessionInfo = this.expireSession();
|
|
36943
|
+
}
|
|
36944
|
+
this.storeLastInteractionEventInformation(sessionInfo, eventTime);
|
|
36871
36945
|
}
|
|
36872
|
-
this.storeLastInteractionEventInformation(sessionInfo, eventTime);
|
|
36873
36946
|
capturedEvent.sessionId = sessionInfo.sessionId;
|
|
36874
36947
|
}
|
|
36875
36948
|
sessionInfo(defaultId = this.pendo.randomString(16)) {
|
|
36876
|
-
let currentSessionInfo = this.api.agentStorage.read(SESSION_ID
|
|
36877
|
-
this.api.agentStorage.read(SESSION_ID);
|
|
36949
|
+
let currentSessionInfo = this.api.agentStorage.read(SESSION_ID) ||
|
|
36950
|
+
this.api.agentStorage.read(SESSION_ID, false, '');
|
|
36878
36951
|
if (!currentSessionInfo) {
|
|
36879
36952
|
currentSessionInfo = JSON.stringify({
|
|
36880
36953
|
sessionId: defaultId,
|
|
36881
36954
|
timestamp: new Date().getTime()
|
|
36882
36955
|
});
|
|
36883
|
-
this.api.agentStorage.write(SESSION_ID, currentSessionInfo
|
|
36956
|
+
this.api.agentStorage.write(SESSION_ID, currentSessionInfo);
|
|
36884
36957
|
}
|
|
36885
36958
|
return JSON.parse(currentSessionInfo);
|
|
36886
36959
|
}
|
|
36887
36960
|
clearSessionInfo() {
|
|
36888
36961
|
this.api.agentStorage.clear(SESSION_ID);
|
|
36889
|
-
this.api.agentStorage.clear(SESSION_ID, false,
|
|
36962
|
+
this.api.agentStorage.clear(SESSION_ID, false, '');
|
|
36890
36963
|
return this.sessionInfo();
|
|
36891
36964
|
}
|
|
36892
36965
|
storeLastInteractionEventInformation(sessionInfo, timestamp) {
|
|
36893
36966
|
sessionInfo.timestamp = timestamp;
|
|
36894
|
-
this.api.agentStorage.write(SESSION_ID, JSON.stringify(sessionInfo)
|
|
36967
|
+
this.api.agentStorage.write(SESSION_ID, JSON.stringify(sessionInfo));
|
|
36895
36968
|
}
|
|
36896
36969
|
}
|
|
36897
36970
|
var SessionManager$1 = new SessionManager();
|
|
@@ -37061,7 +37134,6 @@ const searchProviderRegex = new RegExp(`(${searchProviders.join('|')})`, 'i');
|
|
|
37061
37134
|
const socialMediaSources = [
|
|
37062
37135
|
'facebook',
|
|
37063
37136
|
'twitter',
|
|
37064
|
-
'x',
|
|
37065
37137
|
'linkedin',
|
|
37066
37138
|
'instagram',
|
|
37067
37139
|
'pinterest',
|
|
@@ -37080,7 +37152,15 @@ const socialMediaSources = [
|
|
|
37080
37152
|
'qq',
|
|
37081
37153
|
'line'
|
|
37082
37154
|
];
|
|
37155
|
+
// these are used for strict referrer checking of domains that cause false positive matches in regex checks
|
|
37156
|
+
const socialMediaDomains = [
|
|
37157
|
+
't.co',
|
|
37158
|
+
'x.com'
|
|
37159
|
+
];
|
|
37083
37160
|
const socialMediaRegex = new RegExp(`(${socialMediaSources.join('|')})`, 'i');
|
|
37161
|
+
function isSocialMediaReferral(referrer, _) {
|
|
37162
|
+
return isReferral(socialMediaRegex, referrer) || _.contains(socialMediaDomains, referrer);
|
|
37163
|
+
}
|
|
37084
37164
|
// video sites - must be lowercase
|
|
37085
37165
|
// this is used for checking the utm_source value to see if it is a video site (add others here as needed, or remove any that are not relevant)
|
|
37086
37166
|
const videoSites = [
|
|
@@ -37144,11 +37224,15 @@ function calculateReferrerValue({ referrer, currentHost }) {
|
|
|
37144
37224
|
// update this list to include other possible values for paid from utm_medium field
|
|
37145
37225
|
// this is a regular expression, so you can use the pipe character to separate values
|
|
37146
37226
|
// Anything containing 'cp' or 'ppc' or 'retargeting' will be considered a paid medium.
|
|
37147
|
-
const paidMediumRegex = new RegExp('^(.*cp.*|ppc|retargeting)$');
|
|
37227
|
+
const paidMediumRegex = new RegExp('^(.*cp.*|ppc|retargeting|paid)$');
|
|
37148
37228
|
// Regular expression to match email-related values in the utm_medium field
|
|
37149
37229
|
// this is used to determine if the channel is Email
|
|
37150
37230
|
// add other email-related values here, if needed
|
|
37151
37231
|
const emailRegex = new RegExp('(.*email.*|.*e_mail.*|.*e mail.*|.*e-mail.*)', 'i');
|
|
37232
|
+
function utmIncludesValue(utm = '', value) {
|
|
37233
|
+
return utm.replace(/[^a-zA-Z]/g, '').includes(value);
|
|
37234
|
+
}
|
|
37235
|
+
// order is critical here, as the first match is returned, consider this when adding new channels and updating conditions
|
|
37152
37236
|
const channels = [
|
|
37153
37237
|
[undefined, ({ medium, source, referrer, gclid, fbclid }) => {
|
|
37154
37238
|
return !medium && !source && referrer === 'self' && !gclid && !fbclid;
|
|
@@ -37157,74 +37241,75 @@ const channels = [
|
|
|
37157
37241
|
return !medium && (!source || source === 'direct') && referrer === 'direct';
|
|
37158
37242
|
}],
|
|
37159
37243
|
['Cross-network', ({ source, medium }) => {
|
|
37160
|
-
return medium
|
|
37244
|
+
return utmIncludesValue(medium, 'crossnetwork') || source.match(crossNetworkPlatformsRegex);
|
|
37161
37245
|
}],
|
|
37162
|
-
['Paid Search', ({ source, medium, gclid, _ }) => {
|
|
37246
|
+
['Paid Search', ({ source, medium, referrer, gclid, _ }) => {
|
|
37163
37247
|
return gclid ||
|
|
37164
|
-
medium
|
|
37165
|
-
(medium.match(paidMediumRegex) && _.contains(searchProviders, source));
|
|
37248
|
+
utmIncludesValue(medium, 'paidsearch') ||
|
|
37249
|
+
(medium.match(paidMediumRegex) && (_.contains(searchProviders, source) || isReferral(searchProviderRegex, referrer)));
|
|
37166
37250
|
}],
|
|
37167
|
-
['Paid Social', ({ source, medium, fbclid, _ }) => {
|
|
37251
|
+
['Paid Social', ({ source, medium, referrer, fbclid, _ }) => {
|
|
37168
37252
|
return fbclid ||
|
|
37169
|
-
medium
|
|
37170
|
-
(medium.match(paidMediumRegex) && _.contains(socialMediaSources, source));
|
|
37253
|
+
utmIncludesValue(medium, 'paidsocial') ||
|
|
37254
|
+
(medium.match(paidMediumRegex) && (_.contains(socialMediaSources, source) || isSocialMediaReferral(referrer, _)));
|
|
37171
37255
|
}],
|
|
37172
|
-
['Paid Video', ({ medium, source, _ }) => {
|
|
37173
|
-
return medium
|
|
37174
|
-
(medium.match(paidMediumRegex) && _.contains(videoSites, source));
|
|
37256
|
+
['Paid Video', ({ medium, source, referrer, _ }) => {
|
|
37257
|
+
return utmIncludesValue(medium, 'paidvideo') ||
|
|
37258
|
+
(medium.match(paidMediumRegex) && (_.contains(videoSites, source) || isReferral(videoRegex, referrer)));
|
|
37175
37259
|
}],
|
|
37176
37260
|
['Paid Shopping', ({ medium, source, referrer, _ }) => {
|
|
37177
|
-
return medium
|
|
37178
|
-
medium
|
|
37261
|
+
return utmIncludesValue(medium, 'paidshopping') ||
|
|
37262
|
+
medium === 'shopping' || // needs to match strictly to not incorrectly match 'organic-shopping'
|
|
37179
37263
|
((isReferral(shoppingRegex, referrer) || _.contains(shoppingSites, source)) &&
|
|
37180
37264
|
medium.match(paidMediumRegex));
|
|
37181
37265
|
}],
|
|
37182
37266
|
['Display', ({ medium, _ }) => {
|
|
37183
|
-
return _.contains(['display', 'cpm', 'banner', 'interstitial', 'expandable', 'programmatic'], medium)
|
|
37267
|
+
return _.contains(['display', 'cpm', 'banner', 'interstitial', 'expandable', 'programmatic'], medium) ||
|
|
37268
|
+
utmIncludesValue(medium, 'display');
|
|
37184
37269
|
}],
|
|
37185
37270
|
['Paid Other', ({ medium, source, _ }) => {
|
|
37186
37271
|
// Must be after all other paid channels in the list
|
|
37187
|
-
return medium
|
|
37272
|
+
return utmIncludesValue(medium, 'paidother') ||
|
|
37188
37273
|
medium.match(paidMediumRegex);
|
|
37189
37274
|
}],
|
|
37190
37275
|
['Organic Search', ({ source, medium, referrer, _ }) => {
|
|
37191
|
-
return (medium
|
|
37276
|
+
return (utmIncludesValue(medium, 'organic') && _.contains(searchProviders, source)) || (!medium && isReferral(searchProviderRegex, referrer));
|
|
37192
37277
|
}],
|
|
37193
37278
|
['Organic Social', ({ source, medium, referrer, _ }) => {
|
|
37194
|
-
return (!medium &&
|
|
37195
|
-
medium
|
|
37279
|
+
return (!medium && isSocialMediaReferral(referrer, _)) ||
|
|
37280
|
+
utmIncludesValue(medium, 'social') ||
|
|
37196
37281
|
(_.contains(socialMediaSources, source) && !medium.match(paidMediumRegex));
|
|
37197
37282
|
}],
|
|
37198
37283
|
['Organic Video', ({ medium, referrer }) => {
|
|
37199
|
-
return medium
|
|
37284
|
+
return utmIncludesValue(medium, 'video') ||
|
|
37200
37285
|
(!medium && isReferral(videoRegex, referrer));
|
|
37201
37286
|
}],
|
|
37202
37287
|
['Organic Shopping', ({ medium, referrer }) => {
|
|
37203
|
-
return medium
|
|
37288
|
+
return utmIncludesValue(medium, 'organicshopping') ||
|
|
37204
37289
|
(!medium && isReferral(shoppingRegex, referrer));
|
|
37205
37290
|
}],
|
|
37206
37291
|
['Email', ({ source, medium }) => {
|
|
37207
37292
|
return medium.match(emailRegex) !== null ||
|
|
37208
37293
|
source.match(emailRegex) !== null ||
|
|
37209
|
-
medium
|
|
37294
|
+
utmIncludesValue(medium, 'newsletter');
|
|
37210
37295
|
}],
|
|
37211
37296
|
['Affiliates', ({ medium }) => {
|
|
37212
|
-
return medium
|
|
37297
|
+
return utmIncludesValue(medium, 'affiliate') || utmIncludesValue(medium, 'partner');
|
|
37213
37298
|
}],
|
|
37214
37299
|
['SMS', ({ source, medium }) => {
|
|
37215
|
-
return source
|
|
37300
|
+
return utmIncludesValue(source, 'sms') || utmIncludesValue(medium, 'sms');
|
|
37216
37301
|
}],
|
|
37217
37302
|
['Push Notifications', ({ source, medium }) => {
|
|
37218
37303
|
return medium.endsWith('push') ||
|
|
37219
|
-
medium
|
|
37220
|
-
medium
|
|
37221
|
-
source
|
|
37304
|
+
utmIncludesValue(medium, 'mobile') ||
|
|
37305
|
+
utmIncludesValue(medium, 'notification') ||
|
|
37306
|
+
utmIncludesValue(source, 'firebase');
|
|
37222
37307
|
}],
|
|
37223
37308
|
['Audio', ({ medium }) => {
|
|
37224
|
-
return medium
|
|
37309
|
+
return utmIncludesValue(medium, 'podcast') || utmIncludesValue(medium, 'audio');
|
|
37225
37310
|
}],
|
|
37226
37311
|
['Referral', ({ medium, referrer }) => {
|
|
37227
|
-
return medium
|
|
37312
|
+
return utmIncludesValue(medium, 'referral') ||
|
|
37228
37313
|
(!!referrer && referrer !== 'self' && referrer !== 'direct');
|
|
37229
37314
|
}],
|
|
37230
37315
|
['Other', ({ medium, source }) => {
|
|
@@ -37914,13 +37999,15 @@ class DOMPrompt {
|
|
|
37914
37999
|
// capture value from copy / paste
|
|
37915
38000
|
this.capturePromptValue();
|
|
37916
38001
|
}, true);
|
|
37917
|
-
this.inputEl.addEventListener('
|
|
37918
|
-
const wasEnterKey = evt.code === 'Enter';
|
|
37919
|
-
this.capturePromptValue(wasEnterKey);
|
|
38002
|
+
this.inputEl.addEventListener('keydown', (evt) => {
|
|
38003
|
+
const wasEnterKey = evt.code === 'Enter' || evt.key === 'Enter' || evt.keyCode === 13;
|
|
37920
38004
|
if (wasEnterKey) {
|
|
37921
38005
|
this.submit(this.latestPromptValue);
|
|
37922
38006
|
}
|
|
37923
38007
|
}, true);
|
|
38008
|
+
this.inputEl.addEventListener('keyup', (evt) => {
|
|
38009
|
+
this.capturePromptValue();
|
|
38010
|
+
}, true);
|
|
37924
38011
|
this.submitEl.addEventListener('click', () => {
|
|
37925
38012
|
this.submit(this.latestPromptValue);
|
|
37926
38013
|
}, true);
|
|
@@ -37948,7 +38035,8 @@ class DOMPrompt {
|
|
|
37948
38035
|
return candidateValue.replace(filtersToUse, 'redacted');
|
|
37949
38036
|
}
|
|
37950
38037
|
submit(origVal) {
|
|
37951
|
-
|
|
38038
|
+
// Don't submit an empty prompt
|
|
38039
|
+
if (!origVal)
|
|
37952
38040
|
return;
|
|
37953
38041
|
const val = this.applyPrivacyFilter(origVal);
|
|
37954
38042
|
// build the payload: id, value, was filter used
|
|
@@ -38003,7 +38091,7 @@ class PromptPlugin {
|
|
|
38003
38091
|
// register config schema
|
|
38004
38092
|
this.api.ConfigReader.addOption(this.configName, ['pendoconfig', 'snippet']);
|
|
38005
38093
|
this.loadConfig(this.configName)
|
|
38006
|
-
.then(config => this.onConfigLoaded(config))
|
|
38094
|
+
.then(config => this.onConfigLoaded(config)).catch(() => { });
|
|
38007
38095
|
}
|
|
38008
38096
|
// a-fake-sync method - puts the api expectation of a promise in place now
|
|
38009
38097
|
// making it easier in the future if the config looking becomes a network call
|
|
@@ -40196,7 +40284,7 @@ function Feedback() {
|
|
|
40196
40284
|
* @access public
|
|
40197
40285
|
* @label PING_COOKIE
|
|
40198
40286
|
*/
|
|
40199
|
-
PluginAPI.agentStorage.registry.addLocal(PING_COOKIE);
|
|
40287
|
+
PluginAPI.agentStorage.registry.addLocal(PING_COOKIE, { duration: PING_COOKIE_EXPIRATION });
|
|
40200
40288
|
return {
|
|
40201
40289
|
validate
|
|
40202
40290
|
};
|
|
@@ -40225,7 +40313,7 @@ function Feedback() {
|
|
|
40225
40313
|
}
|
|
40226
40314
|
else if (shouldInitializeFeedback() && !globalPendo._.isEmpty(options)) {
|
|
40227
40315
|
const settings = pluginApi.ConfigReader.get('feedbackSettings');
|
|
40228
|
-
init(options, settings)
|
|
40316
|
+
init(options, settings).catch(globalPendo._.noop);
|
|
40229
40317
|
}
|
|
40230
40318
|
}
|
|
40231
40319
|
function handleIdentityChange(event) {
|
|
@@ -40275,7 +40363,7 @@ function Feedback() {
|
|
|
40275
40363
|
buttonHoverAndFocus);
|
|
40276
40364
|
}
|
|
40277
40365
|
function storeLastPingTime(feedbackOptions) {
|
|
40278
|
-
pluginApi.agentStorage.write(PING_COOKIE, getPingCookieValue(feedbackOptions)
|
|
40366
|
+
pluginApi.agentStorage.write(PING_COOKIE, getPingCookieValue(feedbackOptions));
|
|
40279
40367
|
}
|
|
40280
40368
|
function clearLastPingTime() {
|
|
40281
40369
|
pluginApi.agentStorage.clear(PING_COOKIE);
|
|
@@ -40301,7 +40389,7 @@ function Feedback() {
|
|
|
40301
40389
|
.postJSON(getFullUrl('/widget/pendo_ping'), toSend)
|
|
40302
40390
|
.then((response) => {
|
|
40303
40391
|
onWidgetPingResponse(response);
|
|
40304
|
-
})
|
|
40392
|
+
}).catch(() => { onPingFailure(); });
|
|
40305
40393
|
}
|
|
40306
40394
|
}
|
|
40307
40395
|
return pluginApi.q.resolve();
|
|
@@ -46316,8 +46404,8 @@ class SendQueue {
|
|
|
46316
46404
|
return failureCount;
|
|
46317
46405
|
}
|
|
46318
46406
|
pass(payload, dequeue = true) {
|
|
46319
|
-
this.unloads
|
|
46320
|
-
this.pending
|
|
46407
|
+
this.unloads.delete(payload);
|
|
46408
|
+
this.pending.delete(payload);
|
|
46321
46409
|
this.failures.clear();
|
|
46322
46410
|
const index = this.queue.indexOf(payload);
|
|
46323
46411
|
if (index >= 0) {
|
|
@@ -46328,8 +46416,8 @@ class SendQueue {
|
|
|
46328
46416
|
}
|
|
46329
46417
|
}
|
|
46330
46418
|
fail(payload, retry = true) {
|
|
46331
|
-
this.unloads
|
|
46332
|
-
this.pending
|
|
46419
|
+
this.unloads.delete(payload);
|
|
46420
|
+
this.pending.delete(payload);
|
|
46333
46421
|
const failureCount = this.incrementFailure(payload);
|
|
46334
46422
|
if (this.stopped || !retry)
|
|
46335
46423
|
return;
|
|
@@ -46793,7 +46881,7 @@ class SessionRecorder {
|
|
|
46793
46881
|
else if (visitorConfig && visitorConfig.enable && !this.isRecording()) {
|
|
46794
46882
|
this._startRecordingForVisitor(visitorConfig);
|
|
46795
46883
|
}
|
|
46796
|
-
})
|
|
46884
|
+
}).catch((e) => {
|
|
46797
46885
|
this.api.log.critical('Failed to re-fetch recording config', { error: e });
|
|
46798
46886
|
this.logStopReason('VISITOR_CONFIG_ERROR');
|
|
46799
46887
|
});
|
|
@@ -46889,7 +46977,7 @@ class SessionRecorder {
|
|
|
46889
46977
|
return;
|
|
46890
46978
|
}
|
|
46891
46979
|
this._startRecordingForVisitor(visitorConfig);
|
|
46892
|
-
})
|
|
46980
|
+
}).catch((e) => {
|
|
46893
46981
|
this.restartPtm();
|
|
46894
46982
|
this.api.log.critical('Failed to fetch recording config', { error: e });
|
|
46895
46983
|
this.logStopReason('VISITOR_CONFIG_ERROR');
|
|
@@ -47209,7 +47297,8 @@ class SessionRecorder {
|
|
|
47209
47297
|
lastKeyFrame: this.lastKeyFrameTime,
|
|
47210
47298
|
recordingId: this.recordingId,
|
|
47211
47299
|
recordingSessionId: this.sessionId(this.recordingId),
|
|
47212
|
-
url: this.pendo.url.get()
|
|
47300
|
+
url: this.pendo.url.get(),
|
|
47301
|
+
hasUserInteraction: this.pendo._.any(this.buffer.data, this.isUserInteraction)
|
|
47213
47302
|
}, tracer);
|
|
47214
47303
|
if (this.transport.usesSelfHostedWorker) {
|
|
47215
47304
|
payload.usesSelfHostedWorker = true;
|
|
@@ -47291,7 +47380,7 @@ class SessionRecorder {
|
|
|
47291
47380
|
return this.transport.post(url, {
|
|
47292
47381
|
body,
|
|
47293
47382
|
keepalive: true
|
|
47294
|
-
})
|
|
47383
|
+
}).catch((e) => {
|
|
47295
47384
|
this.api.log.critical('Failed to send reason for stopping recording', { error: e });
|
|
47296
47385
|
});
|
|
47297
47386
|
}
|
|
@@ -47307,7 +47396,7 @@ class SessionRecorder {
|
|
|
47307
47396
|
return this.transport.post(url, {
|
|
47308
47397
|
body,
|
|
47309
47398
|
keepalive: true
|
|
47310
|
-
})
|
|
47399
|
+
}).catch((e) => {
|
|
47311
47400
|
this.api.log.critical('Failed to send hosted resources for recording event', { error: e });
|
|
47312
47401
|
});
|
|
47313
47402
|
}
|
|
@@ -47588,7 +47677,7 @@ var WorkerFactory = /*#__PURE__*/createInlineWorkerFactory(/* rollup-plugin-web-
|
|
|
47588
47677
|
sequence
|
|
47589
47678
|
});
|
|
47590
47679
|
}
|
|
47591
|
-
})
|
|
47680
|
+
}).catch(function (e) {
|
|
47592
47681
|
postMessage({
|
|
47593
47682
|
error: e,
|
|
47594
47683
|
sequence
|