@devskin/browser-sdk 1.0.17 → 1.0.18
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/devskin.cjs.js +11 -3
- package/dist/devskin.cjs.js.map +1 -1
- package/dist/devskin.esm.js +11 -3
- package/dist/devskin.esm.js.map +1 -1
- package/dist/devskin.umd.js +11 -3
- package/dist/devskin.umd.js.map +1 -1
- package/dist/devskin.umd.min.js +3 -3
- package/dist/devskin.umd.min.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/devskin.esm.js
CHANGED
|
@@ -5950,7 +5950,7 @@ class DevSkinSDK {
|
|
|
5950
5950
|
* Initialize the DevSkin SDK
|
|
5951
5951
|
*/
|
|
5952
5952
|
init(config) {
|
|
5953
|
-
var _a, _b;
|
|
5953
|
+
var _a, _b, _c, _d;
|
|
5954
5954
|
if (this.initialized) {
|
|
5955
5955
|
console.warn('[DevSkin] SDK already initialized');
|
|
5956
5956
|
return;
|
|
@@ -5987,12 +5987,20 @@ class DevSkinSDK {
|
|
|
5987
5987
|
this.networkCollector.start();
|
|
5988
5988
|
}
|
|
5989
5989
|
// Initialize heatmap collector
|
|
5990
|
-
|
|
5990
|
+
// Auto-enable heatmap if session recording is enabled
|
|
5991
|
+
const heatmapEnabled = ((_a = this.config.heatmapOptions) === null || _a === void 0 ? void 0 : _a.enabled) || ((_b = this.config.sessionRecording) === null || _b === void 0 ? void 0 : _b.enabled);
|
|
5992
|
+
if (heatmapEnabled) {
|
|
5993
|
+
// Merge default heatmap config with user config
|
|
5994
|
+
const heatmapConfig = Object.assign({ enabled: true, trackClicks: true, trackScroll: true, trackMouseMovement: false }, this.config.heatmapOptions);
|
|
5995
|
+
this.config.heatmapOptions = heatmapConfig;
|
|
5991
5996
|
this.heatmapCollector = new HeatmapCollector(this.config, this.transport);
|
|
5992
5997
|
this.heatmapCollector.start();
|
|
5998
|
+
if (this.config.debug) {
|
|
5999
|
+
console.log('[DevSkin] Heatmap collection enabled', ((_c = this.config.sessionRecording) === null || _c === void 0 ? void 0 : _c.enabled) ? '(auto-enabled with session recording)' : '');
|
|
6000
|
+
}
|
|
5993
6001
|
}
|
|
5994
6002
|
// Initialize session recording with rrweb
|
|
5995
|
-
if ((
|
|
6003
|
+
if ((_d = this.config.sessionRecording) === null || _d === void 0 ? void 0 : _d.enabled) {
|
|
5996
6004
|
// Use RRWebRecorder for complete DOM recording
|
|
5997
6005
|
this.rrwebRecorder = new RRWebRecorder(this.sessionId, {
|
|
5998
6006
|
enabled: true,
|