mixpanel-browser 2.71.0 → 2.71.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/.claude/settings.local.json +9 -0
- package/CHANGELOG.md +3 -0
- package/dist/mixpanel-core.cjs.js +7 -5
- package/dist/mixpanel-recorder.js +1 -1
- package/dist/mixpanel-recorder.min.js +1 -1
- package/dist/mixpanel-recorder.min.js.map +1 -1
- package/dist/mixpanel-with-async-recorder.cjs.js +7 -5
- package/dist/mixpanel-with-recorder.js +7 -5
- package/dist/mixpanel-with-recorder.min.js +1 -1
- package/dist/mixpanel.amd.js +7 -5
- package/dist/mixpanel.cjs.js +7 -5
- package/dist/mixpanel.globals.js +7 -5
- package/dist/mixpanel.min.js +70 -70
- package/dist/mixpanel.module.js +7 -5
- package/dist/mixpanel.umd.js +7 -5
- package/package.json +1 -1
- package/src/autocapture/index.js +6 -4
- package/src/config.js +1 -1
package/src/autocapture/index.js
CHANGED
|
@@ -249,6 +249,11 @@ Autocapture.prototype._trackPageLeave = function(ev, currentUrl, currentScrollHe
|
|
|
249
249
|
// User has navigated away already ending their impression.
|
|
250
250
|
return;
|
|
251
251
|
}
|
|
252
|
+
|
|
253
|
+
if (!this.getConfig(CONFIG_TRACK_PAGE_LEAVE) && !this.mp.is_recording_heatmap_data()) {
|
|
254
|
+
return;
|
|
255
|
+
}
|
|
256
|
+
|
|
252
257
|
this.hasTrackedScrollSession = true;
|
|
253
258
|
var viewportHeight = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
|
|
254
259
|
var scrollPercentage = Math.round(Math.max(this.maxScrollViewDepth - viewportHeight, 0) / (currentScrollHeight - viewportHeight) * 100);
|
|
@@ -268,12 +273,9 @@ Autocapture.prototype._trackPageLeave = function(ev, currentUrl, currentScrollHe
|
|
|
268
273
|
'$current_url': currentUrl || _.info.currentUrl(),
|
|
269
274
|
'$viewportHeight': viewportHeight, // This is the fold line
|
|
270
275
|
'$viewportWidth': Math.max(document.documentElement.clientWidth, window.innerWidth || 0),
|
|
276
|
+
'$captured_for_heatmap': this.mp.is_recording_heatmap_data()
|
|
271
277
|
}, DEFAULT_PROPS);
|
|
272
278
|
|
|
273
|
-
if (this.mp.is_recording_heatmap_data() && !this.getConfig(CONFIG_TRACK_PAGE_LEAVE)) {
|
|
274
|
-
props['$captured_for_heatmap'] = true;
|
|
275
|
-
}
|
|
276
|
-
|
|
277
279
|
// Send with beacon transport to ensure event is sent before unload
|
|
278
280
|
this.mp.track(MP_EV_PAGE_LEAVE, props, {transport: 'sendBeacon'});
|
|
279
281
|
};
|