@devskin/browser-sdk 1.0.39 → 1.0.40
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/collectors/heatmap.d.ts +3 -1
- package/dist/collectors/heatmap.d.ts.map +1 -1
- package/dist/devskin.cjs.js +7 -5
- package/dist/devskin.cjs.js.map +1 -1
- package/dist/devskin.esm.js +7 -5
- package/dist/devskin.esm.js.map +1 -1
- package/dist/devskin.umd.js +7 -5
- package/dist/devskin.umd.js.map +1 -1
- package/dist/devskin.umd.min.js +2 -2
- 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
|
@@ -857,9 +857,11 @@ class NetworkCollector {
|
|
|
857
857
|
}
|
|
858
858
|
|
|
859
859
|
class HeatmapCollector {
|
|
860
|
-
constructor(config, transport) {
|
|
860
|
+
constructor(config, transport, anonymousId, sessionId) {
|
|
861
861
|
this.config = config;
|
|
862
862
|
this.transport = transport;
|
|
863
|
+
this.anonymousId = anonymousId;
|
|
864
|
+
this.sessionId = sessionId;
|
|
863
865
|
this.clickData = [];
|
|
864
866
|
this.scrollData = [];
|
|
865
867
|
this.mouseMoveData = [];
|
|
@@ -1003,21 +1005,21 @@ class HeatmapCollector {
|
|
|
1003
1005
|
// Send clicks individually (backend expects one click event per item)
|
|
1004
1006
|
if (this.clickData.length > 0) {
|
|
1005
1007
|
this.clickData.forEach(click => {
|
|
1006
|
-
this.transport.sendHeatmapData(Object.assign({ type: 'click' }, click));
|
|
1008
|
+
this.transport.sendHeatmapData(Object.assign({ type: 'click', anonymousId: this.anonymousId, sessionId: this.sessionId }, click));
|
|
1007
1009
|
});
|
|
1008
1010
|
this.clickData = [];
|
|
1009
1011
|
}
|
|
1010
1012
|
// Send scroll data individually
|
|
1011
1013
|
if (this.scrollData.length > 0) {
|
|
1012
1014
|
this.scrollData.forEach(scroll => {
|
|
1013
|
-
this.transport.sendHeatmapData(Object.assign({ type: 'scroll' }, scroll));
|
|
1015
|
+
this.transport.sendHeatmapData(Object.assign({ type: 'scroll', anonymousId: this.anonymousId, sessionId: this.sessionId }, scroll));
|
|
1014
1016
|
});
|
|
1015
1017
|
this.scrollData = [];
|
|
1016
1018
|
}
|
|
1017
1019
|
// Send mouse moves individually
|
|
1018
1020
|
if (this.mouseMoveData.length > 0) {
|
|
1019
1021
|
this.mouseMoveData.forEach(move => {
|
|
1020
|
-
this.transport.sendHeatmapData(Object.assign({ type: 'mousemove' }, move));
|
|
1022
|
+
this.transport.sendHeatmapData(Object.assign({ type: 'mousemove', anonymousId: this.anonymousId, sessionId: this.sessionId }, move));
|
|
1021
1023
|
});
|
|
1022
1024
|
this.mouseMoveData = [];
|
|
1023
1025
|
}
|
|
@@ -13931,7 +13933,7 @@ class DevSkinSDK {
|
|
|
13931
13933
|
// Merge default heatmap config with user config
|
|
13932
13934
|
const heatmapConfig = Object.assign({ enabled: true, trackClicks: true, trackScroll: true, trackMouseMovement: true, mouseMoveSampling: 0.1 }, this.config.heatmapOptions);
|
|
13933
13935
|
this.config.heatmapOptions = heatmapConfig;
|
|
13934
|
-
this.heatmapCollector = new HeatmapCollector(this.config, this.transport);
|
|
13936
|
+
this.heatmapCollector = new HeatmapCollector(this.config, this.transport, this.anonymousId, this.sessionId);
|
|
13935
13937
|
this.heatmapCollector.start();
|
|
13936
13938
|
// Initialize screenshot collector and capture page
|
|
13937
13939
|
this.screenshotCollector = new ScreenshotCollector(this.config, this.transport);
|