mixpanel-browser 2.79.0 → 2.80.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/.github/workflows/integration-tests.yml +1 -0
- package/CHANGELOG.md +6 -0
- package/dist/async-modules/{mixpanel-recorder-D5HJyV2E.min.js → mixpanel-recorder-B61POiHc.min.js} +2 -2
- package/dist/async-modules/{mixpanel-recorder-D5HJyV2E.min.js.map → mixpanel-recorder-B61POiHc.min.js.map} +1 -1
- package/dist/async-modules/{mixpanel-recorder-P6SEnnPV.js → mixpanel-recorder-C3AW7mPl.js} +7 -3
- package/dist/async-modules/{mixpanel-targeting-BBMVbgJF.js → mixpanel-targeting-CBwOQJZw.js} +1 -1
- package/dist/async-modules/{mixpanel-targeting-1L9FyetZ.min.js → mixpanel-targeting-kdl-eE-1.min.js} +2 -2
- package/dist/async-modules/{mixpanel-targeting-1L9FyetZ.min.js.map → mixpanel-targeting-kdl-eE-1.min.js.map} +1 -1
- package/dist/mixpanel-core.cjs.js +13 -13
- package/dist/mixpanel-recorder.js +7 -3
- package/dist/mixpanel-recorder.min.js +1 -1
- package/dist/mixpanel-recorder.min.js.map +1 -1
- package/dist/mixpanel-targeting.js +1 -1
- package/dist/mixpanel-targeting.min.js +1 -1
- package/dist/mixpanel-targeting.min.js.map +1 -1
- package/dist/mixpanel-with-async-modules.cjs.js +15 -15
- package/dist/mixpanel-with-async-recorder.cjs.js +15 -15
- package/dist/mixpanel-with-recorder.js +19 -15
- package/dist/mixpanel-with-recorder.min.js +1 -1
- package/dist/mixpanel.amd.js +19 -15
- package/dist/mixpanel.cjs.js +19 -15
- package/dist/mixpanel.globals.js +15 -15
- package/dist/mixpanel.min.js +104 -104
- package/dist/mixpanel.module.js +19 -15
- package/dist/mixpanel.umd.js +19 -15
- package/package.json +1 -1
- package/src/autocapture/index.js +10 -10
- package/src/config.js +1 -1
- package/src/flags/index.js +2 -2
- package/src/recorder/session-recording.js +6 -2
- package/.claude/settings.local.json +0 -11
package/dist/mixpanel.module.js
CHANGED
|
@@ -25,7 +25,7 @@ if (typeof(window) === 'undefined') {
|
|
|
25
25
|
|
|
26
26
|
var Config = {
|
|
27
27
|
DEBUG: false,
|
|
28
|
-
LIB_VERSION: '2.
|
|
28
|
+
LIB_VERSION: '2.80.0'
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
// Window global names for async modules
|
|
@@ -23894,6 +23894,7 @@ var SessionRecording = function(options) {
|
|
|
23894
23894
|
|
|
23895
23895
|
this.recordMaxMs = MAX_RECORDING_MS;
|
|
23896
23896
|
this.recordMinMs = 0;
|
|
23897
|
+
this._recordMinMsCheckStart = null;
|
|
23897
23898
|
|
|
23898
23899
|
// disable persistence if localStorage is not supported
|
|
23899
23900
|
// request-queue will automatically disable persistence if indexedDB fails to initialize
|
|
@@ -24009,6 +24010,7 @@ SessionRecording.prototype.startRecording = function (shouldStopBatcher) {
|
|
|
24009
24010
|
// this also applies if the minimum recording length has not been hit yet
|
|
24010
24011
|
// so that we don't send data until we know the recording will be long enough
|
|
24011
24012
|
this.batcher.stop();
|
|
24013
|
+
this._recordMinMsCheckStart = null;
|
|
24012
24014
|
} else {
|
|
24013
24015
|
this.batcher.start();
|
|
24014
24016
|
}
|
|
@@ -24060,9 +24062,11 @@ SessionRecording.prototype.startRecording = function (shouldStopBatcher) {
|
|
|
24060
24062
|
this._onIdleTimeout();
|
|
24061
24063
|
return;
|
|
24062
24064
|
}
|
|
24065
|
+
if (this._recordMinMsCheckStart === null) {
|
|
24066
|
+
this._recordMinMsCheckStart = ev.timestamp;
|
|
24067
|
+
}
|
|
24063
24068
|
if (isUserEvent(ev)) {
|
|
24064
|
-
if (this.batcher.stopped &&
|
|
24065
|
-
// start flushing again after user activity
|
|
24069
|
+
if (this.batcher.stopped && ev.timestamp - this._recordMinMsCheckStart >= this.recordMinMs) {
|
|
24066
24070
|
this.batcher.start();
|
|
24067
24071
|
}
|
|
24068
24072
|
resetIdleTimeout();
|
|
@@ -25850,7 +25854,7 @@ Autocapture.prototype._initScrollDepthTracking = function() {
|
|
|
25850
25854
|
};
|
|
25851
25855
|
|
|
25852
25856
|
Autocapture.prototype.initClickTracking = function() {
|
|
25853
|
-
win.removeEventListener(EV_CLICK, this.listenerClick);
|
|
25857
|
+
win.removeEventListener(EV_CLICK, this.listenerClick, true);
|
|
25854
25858
|
|
|
25855
25859
|
if (!this.getConfig(CONFIG_TRACK_CLICK) && !this.mp.get_config('record_heatmap_data')) {
|
|
25856
25860
|
return;
|
|
@@ -25863,7 +25867,7 @@ Autocapture.prototype.initClickTracking = function() {
|
|
|
25863
25867
|
}
|
|
25864
25868
|
this.trackDomEvent(ev, MP_EV_CLICK);
|
|
25865
25869
|
}.bind(this);
|
|
25866
|
-
win.addEventListener(EV_CLICK, this.listenerClick);
|
|
25870
|
+
win.addEventListener(EV_CLICK, this.listenerClick, true);
|
|
25867
25871
|
};
|
|
25868
25872
|
|
|
25869
25873
|
Autocapture.prototype.initDeadClickTracking = function() {
|
|
@@ -25898,12 +25902,12 @@ Autocapture.prototype.initDeadClickTracking = function() {
|
|
|
25898
25902
|
}
|
|
25899
25903
|
this._deadClickTracker.trackClick(ev, normalizedConfig);
|
|
25900
25904
|
}.bind(this);
|
|
25901
|
-
win.addEventListener(EV_CLICK, this.listenerDeadClick);
|
|
25905
|
+
win.addEventListener(EV_CLICK, this.listenerDeadClick, true);
|
|
25902
25906
|
}
|
|
25903
25907
|
};
|
|
25904
25908
|
|
|
25905
25909
|
Autocapture.prototype.initInputTracking = function() {
|
|
25906
|
-
win.removeEventListener(EV_CHANGE, this.listenerChange);
|
|
25910
|
+
win.removeEventListener(EV_CHANGE, this.listenerChange, true);
|
|
25907
25911
|
|
|
25908
25912
|
if (!this.getConfig(CONFIG_TRACK_INPUT)) {
|
|
25909
25913
|
return;
|
|
@@ -25916,7 +25920,7 @@ Autocapture.prototype.initInputTracking = function() {
|
|
|
25916
25920
|
}
|
|
25917
25921
|
this.trackDomEvent(ev, MP_EV_INPUT);
|
|
25918
25922
|
}.bind(this);
|
|
25919
|
-
win.addEventListener(EV_CHANGE, this.listenerChange);
|
|
25923
|
+
win.addEventListener(EV_CHANGE, this.listenerChange, true);
|
|
25920
25924
|
};
|
|
25921
25925
|
|
|
25922
25926
|
Autocapture.prototype.initPageviewTracking = function() {
|
|
@@ -25973,7 +25977,7 @@ Autocapture.prototype.initPageviewTracking = function() {
|
|
|
25973
25977
|
};
|
|
25974
25978
|
|
|
25975
25979
|
Autocapture.prototype.initRageClickTracking = function() {
|
|
25976
|
-
win.removeEventListener(EV_CLICK, this.listenerRageClick);
|
|
25980
|
+
win.removeEventListener(EV_CLICK, this.listenerRageClick, true);
|
|
25977
25981
|
|
|
25978
25982
|
var rageClickConfig = this._getClickTrackingConfig(CONFIG_TRACK_RAGE_CLICK);
|
|
25979
25983
|
if (!rageClickConfig && !this.mp.get_config('record_heatmap_data')) {
|
|
@@ -25999,7 +26003,7 @@ Autocapture.prototype.initRageClickTracking = function() {
|
|
|
25999
26003
|
this.trackDomEvent(ev, MP_EV_RAGE_CLICK);
|
|
26000
26004
|
}
|
|
26001
26005
|
}.bind(this);
|
|
26002
|
-
win.addEventListener(EV_CLICK, this.listenerRageClick);
|
|
26006
|
+
win.addEventListener(EV_CLICK, this.listenerRageClick, true);
|
|
26003
26007
|
};
|
|
26004
26008
|
|
|
26005
26009
|
Autocapture.prototype.initScrollTracking = function() {
|
|
@@ -26060,7 +26064,7 @@ Autocapture.prototype.initScrollTracking = function() {
|
|
|
26060
26064
|
};
|
|
26061
26065
|
|
|
26062
26066
|
Autocapture.prototype.initSubmitTracking = function() {
|
|
26063
|
-
win.removeEventListener(EV_SUBMIT, this.listenerSubmit);
|
|
26067
|
+
win.removeEventListener(EV_SUBMIT, this.listenerSubmit, true);
|
|
26064
26068
|
|
|
26065
26069
|
if (!this.getConfig(CONFIG_TRACK_SUBMIT)) {
|
|
26066
26070
|
return;
|
|
@@ -26073,7 +26077,7 @@ Autocapture.prototype.initSubmitTracking = function() {
|
|
|
26073
26077
|
}
|
|
26074
26078
|
this.trackDomEvent(ev, MP_EV_SUBMIT);
|
|
26075
26079
|
}.bind(this);
|
|
26076
|
-
win.addEventListener(EV_SUBMIT, this.listenerSubmit);
|
|
26080
|
+
win.addEventListener(EV_SUBMIT, this.listenerSubmit, true);
|
|
26077
26081
|
};
|
|
26078
26082
|
|
|
26079
26083
|
Autocapture.prototype.initPageLeaveTracking = function() {
|
|
@@ -26129,7 +26133,7 @@ Autocapture.prototype.initPageLeaveTracking = function() {
|
|
|
26129
26133
|
|
|
26130
26134
|
Autocapture.prototype.stopDeadClickTracking = function() {
|
|
26131
26135
|
if (this.listenerDeadClick) {
|
|
26132
|
-
win.removeEventListener(EV_CLICK, this.listenerDeadClick);
|
|
26136
|
+
win.removeEventListener(EV_CLICK, this.listenerDeadClick, true);
|
|
26133
26137
|
this.listenerDeadClick = null;
|
|
26134
26138
|
}
|
|
26135
26139
|
|
|
@@ -26790,8 +26794,8 @@ FeatureFlagManager.prototype._processFirstTimeEventCheck = function(eventName, p
|
|
|
26790
26794
|
};
|
|
26791
26795
|
|
|
26792
26796
|
FeatureFlagManager.prototype.getFirstTimeEventApiRoute = function(flagId) {
|
|
26793
|
-
|
|
26794
|
-
return
|
|
26797
|
+
var base = this.getFullApiRoute().replace(/\/$/, '');
|
|
26798
|
+
return base + '/' + flagId + '/first-time-events';
|
|
26795
26799
|
};
|
|
26796
26800
|
|
|
26797
26801
|
FeatureFlagManager.prototype.recordFirstTimeEvent = function(flagId, projectId, firstTimeEventHash) {
|
package/dist/mixpanel.umd.js
CHANGED
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
|
|
32
32
|
var Config = {
|
|
33
33
|
DEBUG: false,
|
|
34
|
-
LIB_VERSION: '2.
|
|
34
|
+
LIB_VERSION: '2.80.0'
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
// Window global names for async modules
|
|
@@ -23900,6 +23900,7 @@
|
|
|
23900
23900
|
|
|
23901
23901
|
this.recordMaxMs = MAX_RECORDING_MS;
|
|
23902
23902
|
this.recordMinMs = 0;
|
|
23903
|
+
this._recordMinMsCheckStart = null;
|
|
23903
23904
|
|
|
23904
23905
|
// disable persistence if localStorage is not supported
|
|
23905
23906
|
// request-queue will automatically disable persistence if indexedDB fails to initialize
|
|
@@ -24015,6 +24016,7 @@
|
|
|
24015
24016
|
// this also applies if the minimum recording length has not been hit yet
|
|
24016
24017
|
// so that we don't send data until we know the recording will be long enough
|
|
24017
24018
|
this.batcher.stop();
|
|
24019
|
+
this._recordMinMsCheckStart = null;
|
|
24018
24020
|
} else {
|
|
24019
24021
|
this.batcher.start();
|
|
24020
24022
|
}
|
|
@@ -24066,9 +24068,11 @@
|
|
|
24066
24068
|
this._onIdleTimeout();
|
|
24067
24069
|
return;
|
|
24068
24070
|
}
|
|
24071
|
+
if (this._recordMinMsCheckStart === null) {
|
|
24072
|
+
this._recordMinMsCheckStart = ev.timestamp;
|
|
24073
|
+
}
|
|
24069
24074
|
if (isUserEvent(ev)) {
|
|
24070
|
-
if (this.batcher.stopped &&
|
|
24071
|
-
// start flushing again after user activity
|
|
24075
|
+
if (this.batcher.stopped && ev.timestamp - this._recordMinMsCheckStart >= this.recordMinMs) {
|
|
24072
24076
|
this.batcher.start();
|
|
24073
24077
|
}
|
|
24074
24078
|
resetIdleTimeout();
|
|
@@ -25856,7 +25860,7 @@
|
|
|
25856
25860
|
};
|
|
25857
25861
|
|
|
25858
25862
|
Autocapture.prototype.initClickTracking = function() {
|
|
25859
|
-
win.removeEventListener(EV_CLICK, this.listenerClick);
|
|
25863
|
+
win.removeEventListener(EV_CLICK, this.listenerClick, true);
|
|
25860
25864
|
|
|
25861
25865
|
if (!this.getConfig(CONFIG_TRACK_CLICK) && !this.mp.get_config('record_heatmap_data')) {
|
|
25862
25866
|
return;
|
|
@@ -25869,7 +25873,7 @@
|
|
|
25869
25873
|
}
|
|
25870
25874
|
this.trackDomEvent(ev, MP_EV_CLICK);
|
|
25871
25875
|
}.bind(this);
|
|
25872
|
-
win.addEventListener(EV_CLICK, this.listenerClick);
|
|
25876
|
+
win.addEventListener(EV_CLICK, this.listenerClick, true);
|
|
25873
25877
|
};
|
|
25874
25878
|
|
|
25875
25879
|
Autocapture.prototype.initDeadClickTracking = function() {
|
|
@@ -25904,12 +25908,12 @@
|
|
|
25904
25908
|
}
|
|
25905
25909
|
this._deadClickTracker.trackClick(ev, normalizedConfig);
|
|
25906
25910
|
}.bind(this);
|
|
25907
|
-
win.addEventListener(EV_CLICK, this.listenerDeadClick);
|
|
25911
|
+
win.addEventListener(EV_CLICK, this.listenerDeadClick, true);
|
|
25908
25912
|
}
|
|
25909
25913
|
};
|
|
25910
25914
|
|
|
25911
25915
|
Autocapture.prototype.initInputTracking = function() {
|
|
25912
|
-
win.removeEventListener(EV_CHANGE, this.listenerChange);
|
|
25916
|
+
win.removeEventListener(EV_CHANGE, this.listenerChange, true);
|
|
25913
25917
|
|
|
25914
25918
|
if (!this.getConfig(CONFIG_TRACK_INPUT)) {
|
|
25915
25919
|
return;
|
|
@@ -25922,7 +25926,7 @@
|
|
|
25922
25926
|
}
|
|
25923
25927
|
this.trackDomEvent(ev, MP_EV_INPUT);
|
|
25924
25928
|
}.bind(this);
|
|
25925
|
-
win.addEventListener(EV_CHANGE, this.listenerChange);
|
|
25929
|
+
win.addEventListener(EV_CHANGE, this.listenerChange, true);
|
|
25926
25930
|
};
|
|
25927
25931
|
|
|
25928
25932
|
Autocapture.prototype.initPageviewTracking = function() {
|
|
@@ -25979,7 +25983,7 @@
|
|
|
25979
25983
|
};
|
|
25980
25984
|
|
|
25981
25985
|
Autocapture.prototype.initRageClickTracking = function() {
|
|
25982
|
-
win.removeEventListener(EV_CLICK, this.listenerRageClick);
|
|
25986
|
+
win.removeEventListener(EV_CLICK, this.listenerRageClick, true);
|
|
25983
25987
|
|
|
25984
25988
|
var rageClickConfig = this._getClickTrackingConfig(CONFIG_TRACK_RAGE_CLICK);
|
|
25985
25989
|
if (!rageClickConfig && !this.mp.get_config('record_heatmap_data')) {
|
|
@@ -26005,7 +26009,7 @@
|
|
|
26005
26009
|
this.trackDomEvent(ev, MP_EV_RAGE_CLICK);
|
|
26006
26010
|
}
|
|
26007
26011
|
}.bind(this);
|
|
26008
|
-
win.addEventListener(EV_CLICK, this.listenerRageClick);
|
|
26012
|
+
win.addEventListener(EV_CLICK, this.listenerRageClick, true);
|
|
26009
26013
|
};
|
|
26010
26014
|
|
|
26011
26015
|
Autocapture.prototype.initScrollTracking = function() {
|
|
@@ -26066,7 +26070,7 @@
|
|
|
26066
26070
|
};
|
|
26067
26071
|
|
|
26068
26072
|
Autocapture.prototype.initSubmitTracking = function() {
|
|
26069
|
-
win.removeEventListener(EV_SUBMIT, this.listenerSubmit);
|
|
26073
|
+
win.removeEventListener(EV_SUBMIT, this.listenerSubmit, true);
|
|
26070
26074
|
|
|
26071
26075
|
if (!this.getConfig(CONFIG_TRACK_SUBMIT)) {
|
|
26072
26076
|
return;
|
|
@@ -26079,7 +26083,7 @@
|
|
|
26079
26083
|
}
|
|
26080
26084
|
this.trackDomEvent(ev, MP_EV_SUBMIT);
|
|
26081
26085
|
}.bind(this);
|
|
26082
|
-
win.addEventListener(EV_SUBMIT, this.listenerSubmit);
|
|
26086
|
+
win.addEventListener(EV_SUBMIT, this.listenerSubmit, true);
|
|
26083
26087
|
};
|
|
26084
26088
|
|
|
26085
26089
|
Autocapture.prototype.initPageLeaveTracking = function() {
|
|
@@ -26135,7 +26139,7 @@
|
|
|
26135
26139
|
|
|
26136
26140
|
Autocapture.prototype.stopDeadClickTracking = function() {
|
|
26137
26141
|
if (this.listenerDeadClick) {
|
|
26138
|
-
win.removeEventListener(EV_CLICK, this.listenerDeadClick);
|
|
26142
|
+
win.removeEventListener(EV_CLICK, this.listenerDeadClick, true);
|
|
26139
26143
|
this.listenerDeadClick = null;
|
|
26140
26144
|
}
|
|
26141
26145
|
|
|
@@ -26796,8 +26800,8 @@
|
|
|
26796
26800
|
};
|
|
26797
26801
|
|
|
26798
26802
|
FeatureFlagManager.prototype.getFirstTimeEventApiRoute = function(flagId) {
|
|
26799
|
-
|
|
26800
|
-
return
|
|
26803
|
+
var base = this.getFullApiRoute().replace(/\/$/, '');
|
|
26804
|
+
return base + '/' + flagId + '/first-time-events';
|
|
26801
26805
|
};
|
|
26802
26806
|
|
|
26803
26807
|
FeatureFlagManager.prototype.recordFirstTimeEvent = function(flagId, projectId, firstTimeEventHash) {
|
package/package.json
CHANGED
package/src/autocapture/index.js
CHANGED
|
@@ -292,7 +292,7 @@ Autocapture.prototype._initScrollDepthTracking = function() {
|
|
|
292
292
|
};
|
|
293
293
|
|
|
294
294
|
Autocapture.prototype.initClickTracking = function() {
|
|
295
|
-
window.removeEventListener(EV_CLICK, this.listenerClick);
|
|
295
|
+
window.removeEventListener(EV_CLICK, this.listenerClick, true);
|
|
296
296
|
|
|
297
297
|
if (!this.getConfig(CONFIG_TRACK_CLICK) && !this.mp.get_config('record_heatmap_data')) {
|
|
298
298
|
return;
|
|
@@ -305,7 +305,7 @@ Autocapture.prototype.initClickTracking = function() {
|
|
|
305
305
|
}
|
|
306
306
|
this.trackDomEvent(ev, MP_EV_CLICK);
|
|
307
307
|
}.bind(this);
|
|
308
|
-
window.addEventListener(EV_CLICK, this.listenerClick);
|
|
308
|
+
window.addEventListener(EV_CLICK, this.listenerClick, true);
|
|
309
309
|
};
|
|
310
310
|
|
|
311
311
|
Autocapture.prototype.initDeadClickTracking = function() {
|
|
@@ -340,12 +340,12 @@ Autocapture.prototype.initDeadClickTracking = function() {
|
|
|
340
340
|
}
|
|
341
341
|
this._deadClickTracker.trackClick(ev, normalizedConfig);
|
|
342
342
|
}.bind(this);
|
|
343
|
-
window.addEventListener(EV_CLICK, this.listenerDeadClick);
|
|
343
|
+
window.addEventListener(EV_CLICK, this.listenerDeadClick, true);
|
|
344
344
|
}
|
|
345
345
|
};
|
|
346
346
|
|
|
347
347
|
Autocapture.prototype.initInputTracking = function() {
|
|
348
|
-
window.removeEventListener(EV_CHANGE, this.listenerChange);
|
|
348
|
+
window.removeEventListener(EV_CHANGE, this.listenerChange, true);
|
|
349
349
|
|
|
350
350
|
if (!this.getConfig(CONFIG_TRACK_INPUT)) {
|
|
351
351
|
return;
|
|
@@ -358,7 +358,7 @@ Autocapture.prototype.initInputTracking = function() {
|
|
|
358
358
|
}
|
|
359
359
|
this.trackDomEvent(ev, MP_EV_INPUT);
|
|
360
360
|
}.bind(this);
|
|
361
|
-
window.addEventListener(EV_CHANGE, this.listenerChange);
|
|
361
|
+
window.addEventListener(EV_CHANGE, this.listenerChange, true);
|
|
362
362
|
};
|
|
363
363
|
|
|
364
364
|
Autocapture.prototype.initPageviewTracking = function() {
|
|
@@ -415,7 +415,7 @@ Autocapture.prototype.initPageviewTracking = function() {
|
|
|
415
415
|
};
|
|
416
416
|
|
|
417
417
|
Autocapture.prototype.initRageClickTracking = function() {
|
|
418
|
-
window.removeEventListener(EV_CLICK, this.listenerRageClick);
|
|
418
|
+
window.removeEventListener(EV_CLICK, this.listenerRageClick, true);
|
|
419
419
|
|
|
420
420
|
var rageClickConfig = this._getClickTrackingConfig(CONFIG_TRACK_RAGE_CLICK);
|
|
421
421
|
if (!rageClickConfig && !this.mp.get_config('record_heatmap_data')) {
|
|
@@ -441,7 +441,7 @@ Autocapture.prototype.initRageClickTracking = function() {
|
|
|
441
441
|
this.trackDomEvent(ev, MP_EV_RAGE_CLICK);
|
|
442
442
|
}
|
|
443
443
|
}.bind(this);
|
|
444
|
-
window.addEventListener(EV_CLICK, this.listenerRageClick);
|
|
444
|
+
window.addEventListener(EV_CLICK, this.listenerRageClick, true);
|
|
445
445
|
};
|
|
446
446
|
|
|
447
447
|
Autocapture.prototype.initScrollTracking = function() {
|
|
@@ -502,7 +502,7 @@ Autocapture.prototype.initScrollTracking = function() {
|
|
|
502
502
|
};
|
|
503
503
|
|
|
504
504
|
Autocapture.prototype.initSubmitTracking = function() {
|
|
505
|
-
window.removeEventListener(EV_SUBMIT, this.listenerSubmit);
|
|
505
|
+
window.removeEventListener(EV_SUBMIT, this.listenerSubmit, true);
|
|
506
506
|
|
|
507
507
|
if (!this.getConfig(CONFIG_TRACK_SUBMIT)) {
|
|
508
508
|
return;
|
|
@@ -515,7 +515,7 @@ Autocapture.prototype.initSubmitTracking = function() {
|
|
|
515
515
|
}
|
|
516
516
|
this.trackDomEvent(ev, MP_EV_SUBMIT);
|
|
517
517
|
}.bind(this);
|
|
518
|
-
window.addEventListener(EV_SUBMIT, this.listenerSubmit);
|
|
518
|
+
window.addEventListener(EV_SUBMIT, this.listenerSubmit, true);
|
|
519
519
|
};
|
|
520
520
|
|
|
521
521
|
Autocapture.prototype.initPageLeaveTracking = function() {
|
|
@@ -571,7 +571,7 @@ Autocapture.prototype.initPageLeaveTracking = function() {
|
|
|
571
571
|
|
|
572
572
|
Autocapture.prototype.stopDeadClickTracking = function() {
|
|
573
573
|
if (this.listenerDeadClick) {
|
|
574
|
-
window.removeEventListener(EV_CLICK, this.listenerDeadClick);
|
|
574
|
+
window.removeEventListener(EV_CLICK, this.listenerDeadClick, true);
|
|
575
575
|
this.listenerDeadClick = null;
|
|
576
576
|
}
|
|
577
577
|
|
package/src/config.js
CHANGED
package/src/flags/index.js
CHANGED
|
@@ -452,8 +452,8 @@ FeatureFlagManager.prototype._processFirstTimeEventCheck = function(eventName, p
|
|
|
452
452
|
};
|
|
453
453
|
|
|
454
454
|
FeatureFlagManager.prototype.getFirstTimeEventApiRoute = function(flagId) {
|
|
455
|
-
|
|
456
|
-
return
|
|
455
|
+
var base = this.getFullApiRoute().replace(/\/$/, '');
|
|
456
|
+
return base + '/' + flagId + '/first-time-events';
|
|
457
457
|
};
|
|
458
458
|
|
|
459
459
|
FeatureFlagManager.prototype.recordFirstTimeEvent = function(flagId, projectId, firstTimeEventHash) {
|
|
@@ -113,6 +113,7 @@ var SessionRecording = function(options) {
|
|
|
113
113
|
|
|
114
114
|
this.recordMaxMs = MAX_RECORDING_MS;
|
|
115
115
|
this.recordMinMs = 0;
|
|
116
|
+
this._recordMinMsCheckStart = null;
|
|
116
117
|
|
|
117
118
|
// disable persistence if localStorage is not supported
|
|
118
119
|
// request-queue will automatically disable persistence if indexedDB fails to initialize
|
|
@@ -228,6 +229,7 @@ SessionRecording.prototype.startRecording = function (shouldStopBatcher) {
|
|
|
228
229
|
// this also applies if the minimum recording length has not been hit yet
|
|
229
230
|
// so that we don't send data until we know the recording will be long enough
|
|
230
231
|
this.batcher.stop();
|
|
232
|
+
this._recordMinMsCheckStart = null;
|
|
231
233
|
} else {
|
|
232
234
|
this.batcher.start();
|
|
233
235
|
}
|
|
@@ -279,9 +281,11 @@ SessionRecording.prototype.startRecording = function (shouldStopBatcher) {
|
|
|
279
281
|
this._onIdleTimeout();
|
|
280
282
|
return;
|
|
281
283
|
}
|
|
284
|
+
if (this._recordMinMsCheckStart === null) {
|
|
285
|
+
this._recordMinMsCheckStart = ev.timestamp;
|
|
286
|
+
}
|
|
282
287
|
if (isUserEvent(ev)) {
|
|
283
|
-
if (this.batcher.stopped &&
|
|
284
|
-
// start flushing again after user activity
|
|
288
|
+
if (this.batcher.stopped && ev.timestamp - this._recordMinMsCheckStart >= this.recordMinMs) {
|
|
285
289
|
this.batcher.start();
|
|
286
290
|
}
|
|
287
291
|
resetIdleTimeout();
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"permissions": {
|
|
3
|
-
"allow": [
|
|
4
|
-
"WebFetch(domain:docs.saucelabs.com)",
|
|
5
|
-
"WebSearch",
|
|
6
|
-
"WebFetch(domain:raw.githubusercontent.com)",
|
|
7
|
-
"Bash(gh api *)",
|
|
8
|
-
"Bash(python3 -c \"import sys,json; [print\\(f['path']\\) for f in json.load\\(sys.stdin\\)]\")"
|
|
9
|
-
]
|
|
10
|
-
}
|
|
11
|
-
}
|