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
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var Config = {
|
|
4
4
|
DEBUG: false,
|
|
5
|
-
LIB_VERSION: '2.
|
|
5
|
+
LIB_VERSION: '2.80.0'
|
|
6
6
|
};
|
|
7
7
|
|
|
8
8
|
// Window global names for async modules
|
|
@@ -3618,7 +3618,7 @@ Autocapture.prototype._initScrollDepthTracking = function() {
|
|
|
3618
3618
|
};
|
|
3619
3619
|
|
|
3620
3620
|
Autocapture.prototype.initClickTracking = function() {
|
|
3621
|
-
win.removeEventListener(EV_CLICK, this.listenerClick);
|
|
3621
|
+
win.removeEventListener(EV_CLICK, this.listenerClick, true);
|
|
3622
3622
|
|
|
3623
3623
|
if (!this.getConfig(CONFIG_TRACK_CLICK) && !this.mp.get_config('record_heatmap_data')) {
|
|
3624
3624
|
return;
|
|
@@ -3631,7 +3631,7 @@ Autocapture.prototype.initClickTracking = function() {
|
|
|
3631
3631
|
}
|
|
3632
3632
|
this.trackDomEvent(ev, MP_EV_CLICK);
|
|
3633
3633
|
}.bind(this);
|
|
3634
|
-
win.addEventListener(EV_CLICK, this.listenerClick);
|
|
3634
|
+
win.addEventListener(EV_CLICK, this.listenerClick, true);
|
|
3635
3635
|
};
|
|
3636
3636
|
|
|
3637
3637
|
Autocapture.prototype.initDeadClickTracking = function() {
|
|
@@ -3666,12 +3666,12 @@ Autocapture.prototype.initDeadClickTracking = function() {
|
|
|
3666
3666
|
}
|
|
3667
3667
|
this._deadClickTracker.trackClick(ev, normalizedConfig);
|
|
3668
3668
|
}.bind(this);
|
|
3669
|
-
win.addEventListener(EV_CLICK, this.listenerDeadClick);
|
|
3669
|
+
win.addEventListener(EV_CLICK, this.listenerDeadClick, true);
|
|
3670
3670
|
}
|
|
3671
3671
|
};
|
|
3672
3672
|
|
|
3673
3673
|
Autocapture.prototype.initInputTracking = function() {
|
|
3674
|
-
win.removeEventListener(EV_CHANGE, this.listenerChange);
|
|
3674
|
+
win.removeEventListener(EV_CHANGE, this.listenerChange, true);
|
|
3675
3675
|
|
|
3676
3676
|
if (!this.getConfig(CONFIG_TRACK_INPUT)) {
|
|
3677
3677
|
return;
|
|
@@ -3684,7 +3684,7 @@ Autocapture.prototype.initInputTracking = function() {
|
|
|
3684
3684
|
}
|
|
3685
3685
|
this.trackDomEvent(ev, MP_EV_INPUT);
|
|
3686
3686
|
}.bind(this);
|
|
3687
|
-
win.addEventListener(EV_CHANGE, this.listenerChange);
|
|
3687
|
+
win.addEventListener(EV_CHANGE, this.listenerChange, true);
|
|
3688
3688
|
};
|
|
3689
3689
|
|
|
3690
3690
|
Autocapture.prototype.initPageviewTracking = function() {
|
|
@@ -3741,7 +3741,7 @@ Autocapture.prototype.initPageviewTracking = function() {
|
|
|
3741
3741
|
};
|
|
3742
3742
|
|
|
3743
3743
|
Autocapture.prototype.initRageClickTracking = function() {
|
|
3744
|
-
win.removeEventListener(EV_CLICK, this.listenerRageClick);
|
|
3744
|
+
win.removeEventListener(EV_CLICK, this.listenerRageClick, true);
|
|
3745
3745
|
|
|
3746
3746
|
var rageClickConfig = this._getClickTrackingConfig(CONFIG_TRACK_RAGE_CLICK);
|
|
3747
3747
|
if (!rageClickConfig && !this.mp.get_config('record_heatmap_data')) {
|
|
@@ -3767,7 +3767,7 @@ Autocapture.prototype.initRageClickTracking = function() {
|
|
|
3767
3767
|
this.trackDomEvent(ev, MP_EV_RAGE_CLICK);
|
|
3768
3768
|
}
|
|
3769
3769
|
}.bind(this);
|
|
3770
|
-
win.addEventListener(EV_CLICK, this.listenerRageClick);
|
|
3770
|
+
win.addEventListener(EV_CLICK, this.listenerRageClick, true);
|
|
3771
3771
|
};
|
|
3772
3772
|
|
|
3773
3773
|
Autocapture.prototype.initScrollTracking = function() {
|
|
@@ -3828,7 +3828,7 @@ Autocapture.prototype.initScrollTracking = function() {
|
|
|
3828
3828
|
};
|
|
3829
3829
|
|
|
3830
3830
|
Autocapture.prototype.initSubmitTracking = function() {
|
|
3831
|
-
win.removeEventListener(EV_SUBMIT, this.listenerSubmit);
|
|
3831
|
+
win.removeEventListener(EV_SUBMIT, this.listenerSubmit, true);
|
|
3832
3832
|
|
|
3833
3833
|
if (!this.getConfig(CONFIG_TRACK_SUBMIT)) {
|
|
3834
3834
|
return;
|
|
@@ -3841,7 +3841,7 @@ Autocapture.prototype.initSubmitTracking = function() {
|
|
|
3841
3841
|
}
|
|
3842
3842
|
this.trackDomEvent(ev, MP_EV_SUBMIT);
|
|
3843
3843
|
}.bind(this);
|
|
3844
|
-
win.addEventListener(EV_SUBMIT, this.listenerSubmit);
|
|
3844
|
+
win.addEventListener(EV_SUBMIT, this.listenerSubmit, true);
|
|
3845
3845
|
};
|
|
3846
3846
|
|
|
3847
3847
|
Autocapture.prototype.initPageLeaveTracking = function() {
|
|
@@ -3897,7 +3897,7 @@ Autocapture.prototype.initPageLeaveTracking = function() {
|
|
|
3897
3897
|
|
|
3898
3898
|
Autocapture.prototype.stopDeadClickTracking = function() {
|
|
3899
3899
|
if (this.listenerDeadClick) {
|
|
3900
|
-
win.removeEventListener(EV_CLICK, this.listenerDeadClick);
|
|
3900
|
+
win.removeEventListener(EV_CLICK, this.listenerDeadClick, true);
|
|
3901
3901
|
this.listenerDeadClick = null;
|
|
3902
3902
|
}
|
|
3903
3903
|
|
|
@@ -4684,8 +4684,8 @@ FeatureFlagManager.prototype._processFirstTimeEventCheck = function(eventName, p
|
|
|
4684
4684
|
};
|
|
4685
4685
|
|
|
4686
4686
|
FeatureFlagManager.prototype.getFirstTimeEventApiRoute = function(flagId) {
|
|
4687
|
-
|
|
4688
|
-
return
|
|
4687
|
+
var base = this.getFullApiRoute().replace(/\/$/, '');
|
|
4688
|
+
return base + '/' + flagId + '/first-time-events';
|
|
4689
4689
|
};
|
|
4690
4690
|
|
|
4691
4691
|
FeatureFlagManager.prototype.recordFirstTimeEvent = function(flagId, projectId, firstTimeEventHash) {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
var Config = {
|
|
30
|
-
LIB_VERSION: '2.
|
|
30
|
+
LIB_VERSION: '2.80.0'
|
|
31
31
|
};
|
|
32
32
|
var RECORDER_GLOBAL_NAME = '__mp_recorder';
|
|
33
33
|
|
|
@@ -22930,6 +22930,7 @@
|
|
|
22930
22930
|
|
|
22931
22931
|
this.recordMaxMs = MAX_RECORDING_MS;
|
|
22932
22932
|
this.recordMinMs = 0;
|
|
22933
|
+
this._recordMinMsCheckStart = null;
|
|
22933
22934
|
|
|
22934
22935
|
// disable persistence if localStorage is not supported
|
|
22935
22936
|
// request-queue will automatically disable persistence if indexedDB fails to initialize
|
|
@@ -23045,6 +23046,7 @@
|
|
|
23045
23046
|
// this also applies if the minimum recording length has not been hit yet
|
|
23046
23047
|
// so that we don't send data until we know the recording will be long enough
|
|
23047
23048
|
this.batcher.stop();
|
|
23049
|
+
this._recordMinMsCheckStart = null;
|
|
23048
23050
|
} else {
|
|
23049
23051
|
this.batcher.start();
|
|
23050
23052
|
}
|
|
@@ -23096,9 +23098,11 @@
|
|
|
23096
23098
|
this._onIdleTimeout();
|
|
23097
23099
|
return;
|
|
23098
23100
|
}
|
|
23101
|
+
if (this._recordMinMsCheckStart === null) {
|
|
23102
|
+
this._recordMinMsCheckStart = ev.timestamp;
|
|
23103
|
+
}
|
|
23099
23104
|
if (isUserEvent(ev)) {
|
|
23100
|
-
if (this.batcher.stopped &&
|
|
23101
|
-
// start flushing again after user activity
|
|
23105
|
+
if (this.batcher.stopped && ev.timestamp - this._recordMinMsCheckStart >= this.recordMinMs) {
|
|
23102
23106
|
this.batcher.start();
|
|
23103
23107
|
}
|
|
23104
23108
|
resetIdleTimeout();
|