@pendo/agent 2.285.3 → 2.286.1
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 +212 -129
- 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.1_';
|
|
3907
|
+
var PACKAGE_VERSION = '2.286.1';
|
|
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);
|
|
@@ -17971,7 +18025,7 @@ var updateVisitorOptions = function (options = {}) {
|
|
|
17971
18025
|
* @category Identity
|
|
17972
18026
|
* @param {object} options new metadata to set in the agent
|
|
17973
18027
|
* @example
|
|
17974
|
-
* pendo.updateOptions( { visitor: {"role":"admin"}
|
|
18028
|
+
* pendo.updateOptions( { visitor: { "role":"admin" } , account: { "industry":"retail" } });
|
|
17975
18029
|
*/
|
|
17976
18030
|
var updateOptions = makeSafe(function (options) {
|
|
17977
18031
|
var changedOptions = updateVisitorOptions(options);
|
|
@@ -18352,7 +18406,7 @@ var BuildingBlockResourceCenter = (function () {
|
|
|
18352
18406
|
// Assign all modules for the RC on to the RC
|
|
18353
18407
|
resourceCenter.modules = resourceCenterModules;
|
|
18354
18408
|
resourceCenter.badgeHidden = true;
|
|
18355
|
-
return q.all(promises)
|
|
18409
|
+
return q.all(promises).catch(() => {
|
|
18356
18410
|
resourceCenter = null;
|
|
18357
18411
|
log.error('Failed to load one or more Resource Center modules');
|
|
18358
18412
|
return q.resolve();
|
|
@@ -20854,7 +20908,7 @@ class UpdateRunner {
|
|
|
20854
20908
|
}
|
|
20855
20909
|
}, this);
|
|
20856
20910
|
this.paused = true;
|
|
20857
|
-
promise.then(resume)
|
|
20911
|
+
promise.then(resume).catch(resume);
|
|
20858
20912
|
}
|
|
20859
20913
|
else if (currentPhase.isComplete()) {
|
|
20860
20914
|
this.queue.shift();
|
|
@@ -20989,7 +21043,7 @@ function Wrappable() {
|
|
|
20989
21043
|
var debugEnabled = 'debug-enabled';
|
|
20990
21044
|
function getDebuggingStorage() {
|
|
20991
21045
|
try {
|
|
20992
|
-
const debuggingStorage =
|
|
21046
|
+
const debuggingStorage = agentStorage.read(debugEnabled) || JSON.parse(getCookie(debugEnabled));
|
|
20993
21047
|
if (typeof debuggingStorage === 'boolean') { // v1 debugger storage format
|
|
20994
21048
|
return { enabled: debuggingStorage };
|
|
20995
21049
|
}
|
|
@@ -22011,7 +22065,7 @@ function checkForGuidePreviewError(activeStep, currentStepIndex, previewFrame) {
|
|
|
22011
22065
|
errors
|
|
22012
22066
|
}
|
|
22013
22067
|
}, location.origin);
|
|
22014
|
-
})
|
|
22068
|
+
}).catch(_.noop);
|
|
22015
22069
|
}
|
|
22016
22070
|
function exitPreviewMode(designerConfig) {
|
|
22017
22071
|
var currentPreviewGuideConfig = findStoredDesignerPreviewConfig();
|
|
@@ -22192,7 +22246,7 @@ function previewGuideRequest(config, id) {
|
|
|
22192
22246
|
lastGuideStepSeen: preparePreviewLastGuideStepSeen(guidesArray, pendo$1.lastGuideStepSeen),
|
|
22193
22247
|
guides: preparePreviewGuides(guidesArray)
|
|
22194
22248
|
});
|
|
22195
|
-
})
|
|
22249
|
+
}).catch(function (result) {
|
|
22196
22250
|
sendPreviewModeFailureMessage(document, result);
|
|
22197
22251
|
// passthrough rejections to subscribers
|
|
22198
22252
|
return q.reject(result);
|
|
@@ -23623,8 +23677,6 @@ function onTurbolinksPageLoad(document, onPageLoad, beforeTurboCache) {
|
|
|
23623
23677
|
|
|
23624
23678
|
var EMPTY_ARRAY_JZB = 'eJwFwIEIAAAAwDDQd3-N1QABFQC5';
|
|
23625
23679
|
var AD_BLOCK_STORAGE_KEY = 'guides_blocked';
|
|
23626
|
-
var BLOCKED_STORAGE_DURATION = 1800000; // 30 minutes
|
|
23627
|
-
var NOT_BLOCKED_STORAGE_DURATION = 14400000; // 4 hours
|
|
23628
23680
|
var GUIDE_GIF_BLOCKED = '1';
|
|
23629
23681
|
var GUIDE_GIF_NOT_BLOCKED = '0';
|
|
23630
23682
|
var GUIDE_GIF_BLOCKED_MSG = 'Guides disabled: unreachable endpoint guide.gif';
|
|
@@ -23636,11 +23688,11 @@ function setGuidesBlocked(testGuideGifResult) {
|
|
|
23636
23688
|
if (testGuideGifResult.cached)
|
|
23637
23689
|
return;
|
|
23638
23690
|
if (testGuideGifResult.success) {
|
|
23639
|
-
agentStorage.write(AD_BLOCK_STORAGE_KEY, GUIDE_GIF_NOT_BLOCKED
|
|
23691
|
+
agentStorage.write(AD_BLOCK_STORAGE_KEY, GUIDE_GIF_NOT_BLOCKED);
|
|
23640
23692
|
}
|
|
23641
23693
|
else {
|
|
23642
23694
|
log.info(GUIDE_GIF_BLOCKED_MSG);
|
|
23643
|
-
agentStorage.write(AD_BLOCK_STORAGE_KEY, GUIDE_GIF_BLOCKED
|
|
23695
|
+
agentStorage.write(AD_BLOCK_STORAGE_KEY, GUIDE_GIF_BLOCKED);
|
|
23644
23696
|
}
|
|
23645
23697
|
}
|
|
23646
23698
|
function testGuideGifEndpoint(loader, apiKey) {
|
|
@@ -24791,8 +24843,8 @@ var getNextStepInMultistep = function (lastSeen, urlToCheck) {
|
|
|
24791
24843
|
return currentGuide.nextStep(lastSeen, urlToCheck || getNormalizedUrl());
|
|
24792
24844
|
};
|
|
24793
24845
|
/**
|
|
24794
|
-
* Returns the normalized URL sent from the backend with the guides payload. This won
|
|
24795
|
-
* match the desired output from the customer
|
|
24846
|
+
* Returns the normalized URL sent from the backend with the guides payload. This won't always
|
|
24847
|
+
* match the desired output from the customer's url customizations if using location API.
|
|
24796
24848
|
*
|
|
24797
24849
|
* @access public
|
|
24798
24850
|
* @alias getCurrentUrl
|
|
@@ -25211,7 +25263,7 @@ var loadGuides = function (apiKey, visitorId, page, callback) {
|
|
|
25211
25263
|
pendo$1.eventProperties = createEventPropertiesFromFeatures(pendo$1.features);
|
|
25212
25264
|
let globalJsPromise = q.resolve();
|
|
25213
25265
|
if (pendo$1.globalJsUrl) {
|
|
25214
|
-
globalJsPromise = loadGlobalScriptOnce(replaceWithContentHost(pendo$1.globalJsUrl))
|
|
25266
|
+
globalJsPromise = loadGlobalScriptOnce(replaceWithContentHost(pendo$1.globalJsUrl)).catch(function (err) {
|
|
25215
25267
|
log.error('Error loading global script: ', err);
|
|
25216
25268
|
});
|
|
25217
25269
|
}
|
|
@@ -25247,7 +25299,7 @@ var loadGuides = function (apiKey, visitorId, page, callback) {
|
|
|
25247
25299
|
deferred.resolve();
|
|
25248
25300
|
}
|
|
25249
25301
|
}
|
|
25250
|
-
})
|
|
25302
|
+
}).catch(function (err) {
|
|
25251
25303
|
Events.guidesFailed.trigger();
|
|
25252
25304
|
deferred.reject(err);
|
|
25253
25305
|
});
|
|
@@ -25574,7 +25626,7 @@ var initGuides = function () {
|
|
|
25574
25626
|
* @access public
|
|
25575
25627
|
* @label AD_BLOCK_STORAGE_KEY
|
|
25576
25628
|
*/
|
|
25577
|
-
agentStorage.registry.addLocal(AD_BLOCK_STORAGE_KEY);
|
|
25629
|
+
agentStorage.registry.addLocal(AD_BLOCK_STORAGE_KEY, { duration: 14400000 }); // 4 hours default duration
|
|
25578
25630
|
GuideRuntime.initialize();
|
|
25579
25631
|
return () => {
|
|
25580
25632
|
reloadGuides.reset();
|
|
@@ -25742,7 +25794,7 @@ function reloadGuides(url) {
|
|
|
25742
25794
|
reloadGuides.lastVisitorId = visitorId;
|
|
25743
25795
|
reloadGuides.lastAccountId = accountId;
|
|
25744
25796
|
reloadGuides.lastMetadataHash = metadataHash;
|
|
25745
|
-
loadGuides(pendo$1.apiKey, visitorId, url)
|
|
25797
|
+
loadGuides(pendo$1.apiKey, visitorId, url).catch(_.noop);
|
|
25746
25798
|
}
|
|
25747
25799
|
reloadGuides.reset = function () {
|
|
25748
25800
|
_.each(['lastUrl', 'lastVisitorId', 'lastAccountId', 'lastMetadataHash'], function (prop) {
|
|
@@ -27012,15 +27064,14 @@ const initialize = makeSafe(function (options) {
|
|
|
27012
27064
|
*/
|
|
27013
27065
|
agentStorage.registry.addLocal(OPTIONS_HASH_KEY_NAME);
|
|
27014
27066
|
/**
|
|
27015
|
-
*
|
|
27016
|
-
* used settings, either on the next time it is opened or after a page refresh.
|
|
27067
|
+
* Stores debugging configuration and state for the Pendo debugger.
|
|
27017
27068
|
*
|
|
27018
27069
|
* @name debug-enabled
|
|
27019
27070
|
* @category Cookies/localStorage
|
|
27020
27071
|
* @access public
|
|
27021
27072
|
* @label debugEnabled
|
|
27022
27073
|
*/
|
|
27023
|
-
agentStorage.registry.addLocal(debugEnabled);
|
|
27074
|
+
agentStorage.registry.addLocal(debugEnabled, { isPlain: true, serializer: JSON.stringify, deserializer: SafeJsonDeserializer });
|
|
27024
27075
|
// Disable content pre-fetch for guide center
|
|
27025
27076
|
pendo$1.disableGuideCenterContentSearch = options.disableGuideCenterContentSearch;
|
|
27026
27077
|
// Register handlers passed through pendo_options
|
|
@@ -27876,7 +27927,7 @@ var enableLogging = function () {
|
|
|
27876
27927
|
if (logOverride) {
|
|
27877
27928
|
return 'logging already enabled';
|
|
27878
27929
|
}
|
|
27879
|
-
agentStorage.write(LOG_ENABLED, 'true'
|
|
27930
|
+
agentStorage.write(LOG_ENABLED, 'true');
|
|
27880
27931
|
logOverride = true;
|
|
27881
27932
|
return 'logging enabled';
|
|
27882
27933
|
};
|
|
@@ -27892,7 +27943,7 @@ var disableLogging = function () {
|
|
|
27892
27943
|
if (!logOverride) {
|
|
27893
27944
|
return 'logging already disabled';
|
|
27894
27945
|
}
|
|
27895
|
-
agentStorage.write(LOG_ENABLED, 'false'
|
|
27946
|
+
agentStorage.write(LOG_ENABLED, 'false');
|
|
27896
27947
|
logOverride = false;
|
|
27897
27948
|
return 'logging disabled';
|
|
27898
27949
|
};
|
|
@@ -27909,7 +27960,7 @@ function initLogging() {
|
|
|
27909
27960
|
* @access public
|
|
27910
27961
|
* @label LOG_ENABLED
|
|
27911
27962
|
*/
|
|
27912
|
-
agentStorage.registry.addLocal(LOG_ENABLED);
|
|
27963
|
+
agentStorage.registry.addLocal(LOG_ENABLED, { isPlain: true });
|
|
27913
27964
|
/**
|
|
27914
27965
|
* DEPRECATED: Stores the active contexts for logging.
|
|
27915
27966
|
*
|
|
@@ -27918,7 +27969,7 @@ function initLogging() {
|
|
|
27918
27969
|
* @access private
|
|
27919
27970
|
* @label ACTIVE_CONTEXTS
|
|
27920
27971
|
*/
|
|
27921
|
-
agentStorage.registry.addLocal(ACTIVE_CONTEXTS);
|
|
27972
|
+
agentStorage.registry.addLocal(ACTIVE_CONTEXTS, { isPlain: true });
|
|
27922
27973
|
}
|
|
27923
27974
|
var createContexts = function (contexts, args) {
|
|
27924
27975
|
return _.compact([].concat(contexts, args));
|
|
@@ -27998,7 +28049,7 @@ var getActiveContexts = function () {
|
|
|
27998
28049
|
};
|
|
27999
28050
|
var setActiveContexts = function (contexts) {
|
|
28000
28051
|
activeContexts = createContexts(contexts);
|
|
28001
|
-
agentStorage.write(ACTIVE_CONTEXTS, activeContexts.join(',')
|
|
28052
|
+
agentStorage.write(ACTIVE_CONTEXTS, activeContexts.join(','));
|
|
28002
28053
|
};
|
|
28003
28054
|
var doConsoleLog = function (msg, prefix) {
|
|
28004
28055
|
if (!canWeLog())
|
|
@@ -30485,8 +30536,8 @@ function GuideStep(guide) {
|
|
|
30485
30536
|
return;
|
|
30486
30537
|
}
|
|
30487
30538
|
var showPromise = GuideDisplay.show(step, reason);
|
|
30488
|
-
if (showPromise && showPromise
|
|
30489
|
-
showPromise
|
|
30539
|
+
if (showPromise && showPromise.catch) {
|
|
30540
|
+
showPromise.catch(_.noop);
|
|
30490
30541
|
}
|
|
30491
30542
|
return showPromise;
|
|
30492
30543
|
};
|
|
@@ -31269,7 +31320,7 @@ var FramesModule = (function () {
|
|
|
31269
31320
|
if (step) {
|
|
31270
31321
|
var showLocalPromise = GuideDisplay.showLocal(step, payload.reason);
|
|
31271
31322
|
if (isPromise(showLocalPromise)) {
|
|
31272
|
-
showLocalPromise.then(afterShowLocal)
|
|
31323
|
+
showLocalPromise.then(afterShowLocal).catch(_.noop);
|
|
31273
31324
|
}
|
|
31274
31325
|
else {
|
|
31275
31326
|
afterShowLocal(showLocalPromise);
|
|
@@ -32570,7 +32621,7 @@ const DebuggerModule = (() => {
|
|
|
32570
32621
|
});
|
|
32571
32622
|
});
|
|
32572
32623
|
q.all(framePromises).then(results => results)
|
|
32573
|
-
.then((results) => response(results))
|
|
32624
|
+
.then((results) => response(results)).catch((error) => response({ error }));
|
|
32574
32625
|
}
|
|
32575
32626
|
};
|
|
32576
32627
|
const getters = {};
|
|
@@ -33403,10 +33454,10 @@ var PromoteMetadata = (function () {
|
|
|
33403
33454
|
* @access public
|
|
33404
33455
|
* @label SCHEMA_GROUP
|
|
33405
33456
|
*/
|
|
33406
|
-
pluginApi.agentStorage.registry.addLocal(SCHEMA_GROUP);
|
|
33457
|
+
pluginApi.agentStorage.registry.addLocal(SCHEMA_GROUP, { isSecure: true, serializer: JSON.stringify, deserializer: SafeJsonDeserializer });
|
|
33407
33458
|
if (shouldPersist()) {
|
|
33408
33459
|
try {
|
|
33409
|
-
cachedSchemaGroup =
|
|
33460
|
+
cachedSchemaGroup = pluginApi.agentStorage.read(SCHEMA_GROUP);
|
|
33410
33461
|
}
|
|
33411
33462
|
catch (e) {
|
|
33412
33463
|
resetCachedSchemaGroup();
|
|
@@ -33464,7 +33515,7 @@ var PromoteMetadata = (function () {
|
|
|
33464
33515
|
if (shouldPersist()) {
|
|
33465
33516
|
try {
|
|
33466
33517
|
const storedSchemaGroup = pluginApi.agentStorage.read(SCHEMA_GROUP);
|
|
33467
|
-
cachedSchemaGroup = storedSchemaGroup
|
|
33518
|
+
cachedSchemaGroup = storedSchemaGroup;
|
|
33468
33519
|
cachedSchemaGroup = removePrefixes(cachedSchemaGroup);
|
|
33469
33520
|
}
|
|
33470
33521
|
catch (e) {
|
|
@@ -33489,7 +33540,7 @@ var PromoteMetadata = (function () {
|
|
|
33489
33540
|
}
|
|
33490
33541
|
});
|
|
33491
33542
|
if (shouldPersist()) {
|
|
33492
|
-
pluginApi.agentStorage.write(SCHEMA_GROUP,
|
|
33543
|
+
pluginApi.agentStorage.write(SCHEMA_GROUP, __sg__);
|
|
33493
33544
|
}
|
|
33494
33545
|
return __sg__;
|
|
33495
33546
|
}
|
|
@@ -34587,7 +34638,7 @@ function LauncherElement(config) {
|
|
|
34587
34638
|
var element = dom(target).closest(selector);
|
|
34588
34639
|
if (element.length) {
|
|
34589
34640
|
if (isLauncherVisible()) {
|
|
34590
|
-
agentStorage.write(LAUNCHER_CLOSED, 'yes'
|
|
34641
|
+
agentStorage.write(LAUNCHER_CLOSED, 'yes');
|
|
34591
34642
|
}
|
|
34592
34643
|
else {
|
|
34593
34644
|
pendo$1.guideWidget.position(target);
|
|
@@ -35275,7 +35326,7 @@ var initLauncherPlugin = function (pendo, PluginAPI) {
|
|
|
35275
35326
|
* @access public
|
|
35276
35327
|
* @label LAUNCHER_CLOSED
|
|
35277
35328
|
*/
|
|
35278
|
-
PluginAPI.agentStorage.registry.addLocal(LAUNCHER_CLOSED);
|
|
35329
|
+
PluginAPI.agentStorage.registry.addLocal(LAUNCHER_CLOSED, { duration: 10 * 24 * 60 * 60 * 1000 }); // 10 days default duration
|
|
35279
35330
|
};
|
|
35280
35331
|
var teardownLauncherPlugin = function (pendo, PluginAPI) {
|
|
35281
35332
|
deregisterLoadGuideJobs(loadLauncherContentHandler);
|
|
@@ -36054,7 +36105,7 @@ function enableDebugging(andChain) {
|
|
|
36054
36105
|
return;
|
|
36055
36106
|
const debugging = getDebuggingStorage();
|
|
36056
36107
|
debugging.enabled = true;
|
|
36057
|
-
agentStorage.write(debugEnabled,
|
|
36108
|
+
agentStorage.write(debugEnabled, debugging);
|
|
36058
36109
|
startDebuggingModuleIfEnabled();
|
|
36059
36110
|
if (andChain) {
|
|
36060
36111
|
return debugging;
|
|
@@ -36076,7 +36127,7 @@ function disableDebugging() {
|
|
|
36076
36127
|
store.commit('debugger/debuggingEnabled', false);
|
|
36077
36128
|
const debugging = getDebuggingStorage();
|
|
36078
36129
|
debugging.enabled = false;
|
|
36079
|
-
agentStorage.write(debugEnabled,
|
|
36130
|
+
agentStorage.write(debugEnabled, debugging);
|
|
36080
36131
|
pendo$1.debugging = null;
|
|
36081
36132
|
delete pendo$1.debugging;
|
|
36082
36133
|
dom('#pendo-client-debugger').remove();
|
|
@@ -36839,9 +36890,11 @@ class SessionManager {
|
|
|
36839
36890
|
this.api = PluginAPI;
|
|
36840
36891
|
this.pendo = pendo;
|
|
36841
36892
|
this.subscriptions = [
|
|
36893
|
+
this.api.attachEvent(this.api.Events, 'identify', _.bind(this.changeIdentity, this)),
|
|
36842
36894
|
this.api.attachEvent(this.api.Events, 'eventCaptured', _.bind(this.eventCaptured, this))
|
|
36843
36895
|
];
|
|
36844
36896
|
this.inactivityDuration = this.api.ConfigReader.get('inactivityDuration', THIRTY_MINUTES);
|
|
36897
|
+
this.suffix = this.api.ConfigReader.get('identityStorageSuffix');
|
|
36845
36898
|
/**
|
|
36846
36899
|
* Randomly generated string that identifies a session. This is similar to `pendo_tabId`,
|
|
36847
36900
|
* but identifies the entire browser, rather than individual tabs.
|
|
@@ -36851,8 +36904,16 @@ class SessionManager {
|
|
|
36851
36904
|
* @access public
|
|
36852
36905
|
* @label SESSION_ID
|
|
36853
36906
|
*/
|
|
36854
|
-
this.api.agentStorage.registry.addLocal(SESSION_ID);
|
|
36855
|
-
|
|
36907
|
+
this.api.agentStorage.registry.addLocal(SESSION_ID, { cookieSuffix: this.suffix, isSecure: true });
|
|
36908
|
+
}
|
|
36909
|
+
changeIdentity(identifyEvent) {
|
|
36910
|
+
if (!identifyEvent || !identifyEvent.data || !identifyEvent.data.length)
|
|
36911
|
+
return;
|
|
36912
|
+
const { visitor_id, old_visitor_id } = identifyEvent.data[0];
|
|
36913
|
+
if (visitor_id !== old_visitor_id &&
|
|
36914
|
+
!this.pendo.isAnonymousVisitor(old_visitor_id)) {
|
|
36915
|
+
this.expireSession();
|
|
36916
|
+
}
|
|
36856
36917
|
}
|
|
36857
36918
|
teardown() {
|
|
36858
36919
|
_.each(this.subscriptions, function (unsubscribe) {
|
|
@@ -36867,40 +36928,46 @@ class SessionManager {
|
|
|
36867
36928
|
}
|
|
36868
36929
|
return false;
|
|
36869
36930
|
}
|
|
36931
|
+
expireSession() {
|
|
36932
|
+
const newSessionInfo = this.clearSessionInfo();
|
|
36933
|
+
this.api.Events.sessionChanged.trigger(newSessionInfo);
|
|
36934
|
+
return newSessionInfo;
|
|
36935
|
+
}
|
|
36870
36936
|
eventCaptured(event) {
|
|
36871
36937
|
if (!event || !event.data || !event.data.length)
|
|
36872
36938
|
return;
|
|
36873
36939
|
var capturedEvent = event.data[0];
|
|
36874
36940
|
const eventTime = capturedEvent.browser_time || new Date().getTime();
|
|
36875
36941
|
let sessionInfo = this.sessionInfo();
|
|
36876
|
-
if (
|
|
36877
|
-
|
|
36878
|
-
|
|
36879
|
-
|
|
36942
|
+
if (capturedEvent.hasUserInteraction || capturedEvent.type !== 'recording') {
|
|
36943
|
+
if (this.isExpired(sessionInfo, eventTime)) {
|
|
36944
|
+
// the current event will be attributed to the *new* session
|
|
36945
|
+
sessionInfo = this.expireSession();
|
|
36946
|
+
}
|
|
36947
|
+
this.storeLastInteractionEventInformation(sessionInfo, eventTime);
|
|
36880
36948
|
}
|
|
36881
|
-
this.storeLastInteractionEventInformation(sessionInfo, eventTime);
|
|
36882
36949
|
capturedEvent.sessionId = sessionInfo.sessionId;
|
|
36883
36950
|
}
|
|
36884
36951
|
sessionInfo(defaultId = this.pendo.randomString(16)) {
|
|
36885
|
-
let currentSessionInfo = this.api.agentStorage.read(SESSION_ID
|
|
36886
|
-
this.api.agentStorage.read(SESSION_ID);
|
|
36952
|
+
let currentSessionInfo = this.api.agentStorage.read(SESSION_ID) ||
|
|
36953
|
+
this.api.agentStorage.read(SESSION_ID, false, '');
|
|
36887
36954
|
if (!currentSessionInfo) {
|
|
36888
36955
|
currentSessionInfo = JSON.stringify({
|
|
36889
36956
|
sessionId: defaultId,
|
|
36890
36957
|
timestamp: new Date().getTime()
|
|
36891
36958
|
});
|
|
36892
|
-
this.api.agentStorage.write(SESSION_ID, currentSessionInfo
|
|
36959
|
+
this.api.agentStorage.write(SESSION_ID, currentSessionInfo);
|
|
36893
36960
|
}
|
|
36894
36961
|
return JSON.parse(currentSessionInfo);
|
|
36895
36962
|
}
|
|
36896
36963
|
clearSessionInfo() {
|
|
36897
36964
|
this.api.agentStorage.clear(SESSION_ID);
|
|
36898
|
-
this.api.agentStorage.clear(SESSION_ID, false,
|
|
36965
|
+
this.api.agentStorage.clear(SESSION_ID, false, '');
|
|
36899
36966
|
return this.sessionInfo();
|
|
36900
36967
|
}
|
|
36901
36968
|
storeLastInteractionEventInformation(sessionInfo, timestamp) {
|
|
36902
36969
|
sessionInfo.timestamp = timestamp;
|
|
36903
|
-
this.api.agentStorage.write(SESSION_ID, JSON.stringify(sessionInfo)
|
|
36970
|
+
this.api.agentStorage.write(SESSION_ID, JSON.stringify(sessionInfo));
|
|
36904
36971
|
}
|
|
36905
36972
|
}
|
|
36906
36973
|
var SessionManager$1 = new SessionManager();
|
|
@@ -37070,7 +37137,6 @@ const searchProviderRegex = new RegExp(`(${searchProviders.join('|')})`, 'i');
|
|
|
37070
37137
|
const socialMediaSources = [
|
|
37071
37138
|
'facebook',
|
|
37072
37139
|
'twitter',
|
|
37073
|
-
'x',
|
|
37074
37140
|
'linkedin',
|
|
37075
37141
|
'instagram',
|
|
37076
37142
|
'pinterest',
|
|
@@ -37089,7 +37155,15 @@ const socialMediaSources = [
|
|
|
37089
37155
|
'qq',
|
|
37090
37156
|
'line'
|
|
37091
37157
|
];
|
|
37158
|
+
// these are used for strict referrer checking of domains that cause false positive matches in regex checks
|
|
37159
|
+
const socialMediaDomains = [
|
|
37160
|
+
't.co',
|
|
37161
|
+
'x.com'
|
|
37162
|
+
];
|
|
37092
37163
|
const socialMediaRegex = new RegExp(`(${socialMediaSources.join('|')})`, 'i');
|
|
37164
|
+
function isSocialMediaReferral(referrer, _) {
|
|
37165
|
+
return isReferral(socialMediaRegex, referrer) || _.contains(socialMediaDomains, referrer);
|
|
37166
|
+
}
|
|
37093
37167
|
// video sites - must be lowercase
|
|
37094
37168
|
// 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)
|
|
37095
37169
|
const videoSites = [
|
|
@@ -37153,11 +37227,15 @@ function calculateReferrerValue({ referrer, currentHost }) {
|
|
|
37153
37227
|
// update this list to include other possible values for paid from utm_medium field
|
|
37154
37228
|
// this is a regular expression, so you can use the pipe character to separate values
|
|
37155
37229
|
// Anything containing 'cp' or 'ppc' or 'retargeting' will be considered a paid medium.
|
|
37156
|
-
const paidMediumRegex = new RegExp('^(.*cp.*|ppc|retargeting)$');
|
|
37230
|
+
const paidMediumRegex = new RegExp('^(.*cp.*|ppc|retargeting|paid)$');
|
|
37157
37231
|
// Regular expression to match email-related values in the utm_medium field
|
|
37158
37232
|
// this is used to determine if the channel is Email
|
|
37159
37233
|
// add other email-related values here, if needed
|
|
37160
37234
|
const emailRegex = new RegExp('(.*email.*|.*e_mail.*|.*e mail.*|.*e-mail.*)', 'i');
|
|
37235
|
+
function utmIncludesValue(utm = '', value) {
|
|
37236
|
+
return utm.replace(/[^a-zA-Z]/g, '').includes(value);
|
|
37237
|
+
}
|
|
37238
|
+
// order is critical here, as the first match is returned, consider this when adding new channels and updating conditions
|
|
37161
37239
|
const channels = [
|
|
37162
37240
|
[undefined, ({ medium, source, referrer, gclid, fbclid }) => {
|
|
37163
37241
|
return !medium && !source && referrer === 'self' && !gclid && !fbclid;
|
|
@@ -37166,74 +37244,75 @@ const channels = [
|
|
|
37166
37244
|
return !medium && (!source || source === 'direct') && referrer === 'direct';
|
|
37167
37245
|
}],
|
|
37168
37246
|
['Cross-network', ({ source, medium }) => {
|
|
37169
|
-
return medium
|
|
37247
|
+
return utmIncludesValue(medium, 'crossnetwork') || source.match(crossNetworkPlatformsRegex);
|
|
37170
37248
|
}],
|
|
37171
|
-
['Paid Search', ({ source, medium, gclid, _ }) => {
|
|
37249
|
+
['Paid Search', ({ source, medium, referrer, gclid, _ }) => {
|
|
37172
37250
|
return gclid ||
|
|
37173
|
-
medium
|
|
37174
|
-
(medium.match(paidMediumRegex) && _.contains(searchProviders, source));
|
|
37251
|
+
utmIncludesValue(medium, 'paidsearch') ||
|
|
37252
|
+
(medium.match(paidMediumRegex) && (_.contains(searchProviders, source) || isReferral(searchProviderRegex, referrer)));
|
|
37175
37253
|
}],
|
|
37176
|
-
['Paid Social', ({ source, medium, fbclid, _ }) => {
|
|
37254
|
+
['Paid Social', ({ source, medium, referrer, fbclid, _ }) => {
|
|
37177
37255
|
return fbclid ||
|
|
37178
|
-
medium
|
|
37179
|
-
(medium.match(paidMediumRegex) && _.contains(socialMediaSources, source));
|
|
37256
|
+
utmIncludesValue(medium, 'paidsocial') ||
|
|
37257
|
+
(medium.match(paidMediumRegex) && (_.contains(socialMediaSources, source) || isSocialMediaReferral(referrer, _)));
|
|
37180
37258
|
}],
|
|
37181
|
-
['Paid Video', ({ medium, source, _ }) => {
|
|
37182
|
-
return medium
|
|
37183
|
-
(medium.match(paidMediumRegex) && _.contains(videoSites, source));
|
|
37259
|
+
['Paid Video', ({ medium, source, referrer, _ }) => {
|
|
37260
|
+
return utmIncludesValue(medium, 'paidvideo') ||
|
|
37261
|
+
(medium.match(paidMediumRegex) && (_.contains(videoSites, source) || isReferral(videoRegex, referrer)));
|
|
37184
37262
|
}],
|
|
37185
37263
|
['Paid Shopping', ({ medium, source, referrer, _ }) => {
|
|
37186
|
-
return medium
|
|
37187
|
-
medium
|
|
37264
|
+
return utmIncludesValue(medium, 'paidshopping') ||
|
|
37265
|
+
medium === 'shopping' || // needs to match strictly to not incorrectly match 'organic-shopping'
|
|
37188
37266
|
((isReferral(shoppingRegex, referrer) || _.contains(shoppingSites, source)) &&
|
|
37189
37267
|
medium.match(paidMediumRegex));
|
|
37190
37268
|
}],
|
|
37191
37269
|
['Display', ({ medium, _ }) => {
|
|
37192
|
-
return _.contains(['display', 'cpm', 'banner', 'interstitial', 'expandable', 'programmatic'], medium)
|
|
37270
|
+
return _.contains(['display', 'cpm', 'banner', 'interstitial', 'expandable', 'programmatic'], medium) ||
|
|
37271
|
+
utmIncludesValue(medium, 'display');
|
|
37193
37272
|
}],
|
|
37194
37273
|
['Paid Other', ({ medium, source, _ }) => {
|
|
37195
37274
|
// Must be after all other paid channels in the list
|
|
37196
|
-
return medium
|
|
37275
|
+
return utmIncludesValue(medium, 'paidother') ||
|
|
37197
37276
|
medium.match(paidMediumRegex);
|
|
37198
37277
|
}],
|
|
37199
37278
|
['Organic Search', ({ source, medium, referrer, _ }) => {
|
|
37200
|
-
return (medium
|
|
37279
|
+
return (utmIncludesValue(medium, 'organic') && _.contains(searchProviders, source)) || (!medium && isReferral(searchProviderRegex, referrer));
|
|
37201
37280
|
}],
|
|
37202
37281
|
['Organic Social', ({ source, medium, referrer, _ }) => {
|
|
37203
|
-
return (!medium &&
|
|
37204
|
-
medium
|
|
37282
|
+
return (!medium && isSocialMediaReferral(referrer, _)) ||
|
|
37283
|
+
utmIncludesValue(medium, 'social') ||
|
|
37205
37284
|
(_.contains(socialMediaSources, source) && !medium.match(paidMediumRegex));
|
|
37206
37285
|
}],
|
|
37207
37286
|
['Organic Video', ({ medium, referrer }) => {
|
|
37208
|
-
return medium
|
|
37287
|
+
return utmIncludesValue(medium, 'video') ||
|
|
37209
37288
|
(!medium && isReferral(videoRegex, referrer));
|
|
37210
37289
|
}],
|
|
37211
37290
|
['Organic Shopping', ({ medium, referrer }) => {
|
|
37212
|
-
return medium
|
|
37291
|
+
return utmIncludesValue(medium, 'organicshopping') ||
|
|
37213
37292
|
(!medium && isReferral(shoppingRegex, referrer));
|
|
37214
37293
|
}],
|
|
37215
37294
|
['Email', ({ source, medium }) => {
|
|
37216
37295
|
return medium.match(emailRegex) !== null ||
|
|
37217
37296
|
source.match(emailRegex) !== null ||
|
|
37218
|
-
medium
|
|
37297
|
+
utmIncludesValue(medium, 'newsletter');
|
|
37219
37298
|
}],
|
|
37220
37299
|
['Affiliates', ({ medium }) => {
|
|
37221
|
-
return medium
|
|
37300
|
+
return utmIncludesValue(medium, 'affiliate') || utmIncludesValue(medium, 'partner');
|
|
37222
37301
|
}],
|
|
37223
37302
|
['SMS', ({ source, medium }) => {
|
|
37224
|
-
return source
|
|
37303
|
+
return utmIncludesValue(source, 'sms') || utmIncludesValue(medium, 'sms');
|
|
37225
37304
|
}],
|
|
37226
37305
|
['Push Notifications', ({ source, medium }) => {
|
|
37227
37306
|
return medium.endsWith('push') ||
|
|
37228
|
-
medium
|
|
37229
|
-
medium
|
|
37230
|
-
source
|
|
37307
|
+
utmIncludesValue(medium, 'mobile') ||
|
|
37308
|
+
utmIncludesValue(medium, 'notification') ||
|
|
37309
|
+
utmIncludesValue(source, 'firebase');
|
|
37231
37310
|
}],
|
|
37232
37311
|
['Audio', ({ medium }) => {
|
|
37233
|
-
return medium
|
|
37312
|
+
return utmIncludesValue(medium, 'podcast') || utmIncludesValue(medium, 'audio');
|
|
37234
37313
|
}],
|
|
37235
37314
|
['Referral', ({ medium, referrer }) => {
|
|
37236
|
-
return medium
|
|
37315
|
+
return utmIncludesValue(medium, 'referral') ||
|
|
37237
37316
|
(!!referrer && referrer !== 'self' && referrer !== 'direct');
|
|
37238
37317
|
}],
|
|
37239
37318
|
['Other', ({ medium, source }) => {
|
|
@@ -37923,13 +38002,15 @@ class DOMPrompt {
|
|
|
37923
38002
|
// capture value from copy / paste
|
|
37924
38003
|
this.capturePromptValue();
|
|
37925
38004
|
}, true);
|
|
37926
|
-
this.inputEl.addEventListener('
|
|
37927
|
-
const wasEnterKey = evt.code === 'Enter';
|
|
37928
|
-
this.capturePromptValue(wasEnterKey);
|
|
38005
|
+
this.inputEl.addEventListener('keydown', (evt) => {
|
|
38006
|
+
const wasEnterKey = evt.code === 'Enter' || evt.key === 'Enter' || evt.keyCode === 13;
|
|
37929
38007
|
if (wasEnterKey) {
|
|
37930
38008
|
this.submit(this.latestPromptValue);
|
|
37931
38009
|
}
|
|
37932
38010
|
}, true);
|
|
38011
|
+
this.inputEl.addEventListener('keyup', (evt) => {
|
|
38012
|
+
this.capturePromptValue();
|
|
38013
|
+
}, true);
|
|
37933
38014
|
this.submitEl.addEventListener('click', () => {
|
|
37934
38015
|
this.submit(this.latestPromptValue);
|
|
37935
38016
|
}, true);
|
|
@@ -37957,7 +38038,8 @@ class DOMPrompt {
|
|
|
37957
38038
|
return candidateValue.replace(filtersToUse, 'redacted');
|
|
37958
38039
|
}
|
|
37959
38040
|
submit(origVal) {
|
|
37960
|
-
|
|
38041
|
+
// Don't submit an empty prompt
|
|
38042
|
+
if (!origVal)
|
|
37961
38043
|
return;
|
|
37962
38044
|
const val = this.applyPrivacyFilter(origVal);
|
|
37963
38045
|
// build the payload: id, value, was filter used
|
|
@@ -38012,7 +38094,7 @@ class PromptPlugin {
|
|
|
38012
38094
|
// register config schema
|
|
38013
38095
|
this.api.ConfigReader.addOption(this.configName, ['pendoconfig', 'snippet']);
|
|
38014
38096
|
this.loadConfig(this.configName)
|
|
38015
|
-
.then(config => this.onConfigLoaded(config))
|
|
38097
|
+
.then(config => this.onConfigLoaded(config)).catch(() => { });
|
|
38016
38098
|
}
|
|
38017
38099
|
// a-fake-sync method - puts the api expectation of a promise in place now
|
|
38018
38100
|
// making it easier in the future if the config looking becomes a network call
|
|
@@ -40205,7 +40287,7 @@ function Feedback() {
|
|
|
40205
40287
|
* @access public
|
|
40206
40288
|
* @label PING_COOKIE
|
|
40207
40289
|
*/
|
|
40208
|
-
PluginAPI.agentStorage.registry.addLocal(PING_COOKIE);
|
|
40290
|
+
PluginAPI.agentStorage.registry.addLocal(PING_COOKIE, { duration: PING_COOKIE_EXPIRATION });
|
|
40209
40291
|
return {
|
|
40210
40292
|
validate
|
|
40211
40293
|
};
|
|
@@ -40234,7 +40316,7 @@ function Feedback() {
|
|
|
40234
40316
|
}
|
|
40235
40317
|
else if (shouldInitializeFeedback() && !globalPendo._.isEmpty(options)) {
|
|
40236
40318
|
const settings = pluginApi.ConfigReader.get('feedbackSettings');
|
|
40237
|
-
init(options, settings)
|
|
40319
|
+
init(options, settings).catch(globalPendo._.noop);
|
|
40238
40320
|
}
|
|
40239
40321
|
}
|
|
40240
40322
|
function handleIdentityChange(event) {
|
|
@@ -40284,7 +40366,7 @@ function Feedback() {
|
|
|
40284
40366
|
buttonHoverAndFocus);
|
|
40285
40367
|
}
|
|
40286
40368
|
function storeLastPingTime(feedbackOptions) {
|
|
40287
|
-
pluginApi.agentStorage.write(PING_COOKIE, getPingCookieValue(feedbackOptions)
|
|
40369
|
+
pluginApi.agentStorage.write(PING_COOKIE, getPingCookieValue(feedbackOptions));
|
|
40288
40370
|
}
|
|
40289
40371
|
function clearLastPingTime() {
|
|
40290
40372
|
pluginApi.agentStorage.clear(PING_COOKIE);
|
|
@@ -40310,7 +40392,7 @@ function Feedback() {
|
|
|
40310
40392
|
.postJSON(getFullUrl('/widget/pendo_ping'), toSend)
|
|
40311
40393
|
.then((response) => {
|
|
40312
40394
|
onWidgetPingResponse(response);
|
|
40313
|
-
})
|
|
40395
|
+
}).catch(() => { onPingFailure(); });
|
|
40314
40396
|
}
|
|
40315
40397
|
}
|
|
40316
40398
|
return pluginApi.q.resolve();
|
|
@@ -46325,8 +46407,8 @@ class SendQueue {
|
|
|
46325
46407
|
return failureCount;
|
|
46326
46408
|
}
|
|
46327
46409
|
pass(payload, dequeue = true) {
|
|
46328
|
-
this.unloads
|
|
46329
|
-
this.pending
|
|
46410
|
+
this.unloads.delete(payload);
|
|
46411
|
+
this.pending.delete(payload);
|
|
46330
46412
|
this.failures.clear();
|
|
46331
46413
|
const index = this.queue.indexOf(payload);
|
|
46332
46414
|
if (index >= 0) {
|
|
@@ -46337,8 +46419,8 @@ class SendQueue {
|
|
|
46337
46419
|
}
|
|
46338
46420
|
}
|
|
46339
46421
|
fail(payload, retry = true) {
|
|
46340
|
-
this.unloads
|
|
46341
|
-
this.pending
|
|
46422
|
+
this.unloads.delete(payload);
|
|
46423
|
+
this.pending.delete(payload);
|
|
46342
46424
|
const failureCount = this.incrementFailure(payload);
|
|
46343
46425
|
if (this.stopped || !retry)
|
|
46344
46426
|
return;
|
|
@@ -46802,7 +46884,7 @@ class SessionRecorder {
|
|
|
46802
46884
|
else if (visitorConfig && visitorConfig.enable && !this.isRecording()) {
|
|
46803
46885
|
this._startRecordingForVisitor(visitorConfig);
|
|
46804
46886
|
}
|
|
46805
|
-
})
|
|
46887
|
+
}).catch((e) => {
|
|
46806
46888
|
this.api.log.critical('Failed to re-fetch recording config', { error: e });
|
|
46807
46889
|
this.logStopReason('VISITOR_CONFIG_ERROR');
|
|
46808
46890
|
});
|
|
@@ -46898,7 +46980,7 @@ class SessionRecorder {
|
|
|
46898
46980
|
return;
|
|
46899
46981
|
}
|
|
46900
46982
|
this._startRecordingForVisitor(visitorConfig);
|
|
46901
|
-
})
|
|
46983
|
+
}).catch((e) => {
|
|
46902
46984
|
this.restartPtm();
|
|
46903
46985
|
this.api.log.critical('Failed to fetch recording config', { error: e });
|
|
46904
46986
|
this.logStopReason('VISITOR_CONFIG_ERROR');
|
|
@@ -47218,7 +47300,8 @@ class SessionRecorder {
|
|
|
47218
47300
|
lastKeyFrame: this.lastKeyFrameTime,
|
|
47219
47301
|
recordingId: this.recordingId,
|
|
47220
47302
|
recordingSessionId: this.sessionId(this.recordingId),
|
|
47221
|
-
url: this.pendo.url.get()
|
|
47303
|
+
url: this.pendo.url.get(),
|
|
47304
|
+
hasUserInteraction: this.pendo._.any(this.buffer.data, this.isUserInteraction)
|
|
47222
47305
|
}, tracer);
|
|
47223
47306
|
if (this.transport.usesSelfHostedWorker) {
|
|
47224
47307
|
payload.usesSelfHostedWorker = true;
|
|
@@ -47300,7 +47383,7 @@ class SessionRecorder {
|
|
|
47300
47383
|
return this.transport.post(url, {
|
|
47301
47384
|
body,
|
|
47302
47385
|
keepalive: true
|
|
47303
|
-
})
|
|
47386
|
+
}).catch((e) => {
|
|
47304
47387
|
this.api.log.critical('Failed to send reason for stopping recording', { error: e });
|
|
47305
47388
|
});
|
|
47306
47389
|
}
|
|
@@ -47316,7 +47399,7 @@ class SessionRecorder {
|
|
|
47316
47399
|
return this.transport.post(url, {
|
|
47317
47400
|
body,
|
|
47318
47401
|
keepalive: true
|
|
47319
|
-
})
|
|
47402
|
+
}).catch((e) => {
|
|
47320
47403
|
this.api.log.critical('Failed to send hosted resources for recording event', { error: e });
|
|
47321
47404
|
});
|
|
47322
47405
|
}
|
|
@@ -47597,7 +47680,7 @@ var WorkerFactory = /*#__PURE__*/createInlineWorkerFactory(/* rollup-plugin-web-
|
|
|
47597
47680
|
sequence
|
|
47598
47681
|
});
|
|
47599
47682
|
}
|
|
47600
|
-
})
|
|
47683
|
+
}).catch(function (e) {
|
|
47601
47684
|
postMessage({
|
|
47602
47685
|
error: e,
|
|
47603
47686
|
sequence
|