@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
|
@@ -3,13 +3,15 @@ import { Transport } from '../transport';
|
|
|
3
3
|
export declare class HeatmapCollector {
|
|
4
4
|
private config;
|
|
5
5
|
private transport;
|
|
6
|
+
private anonymousId;
|
|
7
|
+
private sessionId;
|
|
6
8
|
private clickData;
|
|
7
9
|
private scrollData;
|
|
8
10
|
private mouseMoveData;
|
|
9
11
|
private maxScrollDepth;
|
|
10
12
|
private flushInterval;
|
|
11
13
|
private mouseMoveSampling;
|
|
12
|
-
constructor(config: DevSkinConfig, transport: Transport);
|
|
14
|
+
constructor(config: DevSkinConfig, transport: Transport, anonymousId: string, sessionId: string);
|
|
13
15
|
start(): void;
|
|
14
16
|
stop(): void;
|
|
15
17
|
private trackClicks;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"heatmap.d.ts","sourceRoot":"","sources":["../../src/collectors/heatmap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAkCzC,qBAAa,gBAAgB;IASzB,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,SAAS;
|
|
1
|
+
{"version":3,"file":"heatmap.d.ts","sourceRoot":"","sources":["../../src/collectors/heatmap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAkCzC,qBAAa,gBAAgB;IASzB,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,SAAS;IACjB,OAAO,CAAC,WAAW;IACnB,OAAO,CAAC,SAAS;IAXnB,OAAO,CAAC,SAAS,CAAmB;IACpC,OAAO,CAAC,UAAU,CAAoB;IACtC,OAAO,CAAC,aAAa,CAAuB;IAC5C,OAAO,CAAC,cAAc,CAAK;IAC3B,OAAO,CAAC,aAAa,CAA+C;IACpE,OAAO,CAAC,iBAAiB,CAAO;gBAGtB,MAAM,EAAE,aAAa,EACrB,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM;IAG3B,KAAK,IAAI,IAAI;IAoCb,IAAI,IAAI,IAAI;IAQZ,OAAO,CAAC,WAAW;IA8CnB,OAAO,CAAC,gBAAgB;IA2CxB,OAAO,CAAC,kBAAkB;IAkC1B,OAAO,CAAC,KAAK;IAyCb,OAAO,CAAC,kBAAkB;CAc3B"}
|
package/dist/devskin.cjs.js
CHANGED
|
@@ -861,9 +861,11 @@ class NetworkCollector {
|
|
|
861
861
|
}
|
|
862
862
|
|
|
863
863
|
class HeatmapCollector {
|
|
864
|
-
constructor(config, transport) {
|
|
864
|
+
constructor(config, transport, anonymousId, sessionId) {
|
|
865
865
|
this.config = config;
|
|
866
866
|
this.transport = transport;
|
|
867
|
+
this.anonymousId = anonymousId;
|
|
868
|
+
this.sessionId = sessionId;
|
|
867
869
|
this.clickData = [];
|
|
868
870
|
this.scrollData = [];
|
|
869
871
|
this.mouseMoveData = [];
|
|
@@ -1007,21 +1009,21 @@ class HeatmapCollector {
|
|
|
1007
1009
|
// Send clicks individually (backend expects one click event per item)
|
|
1008
1010
|
if (this.clickData.length > 0) {
|
|
1009
1011
|
this.clickData.forEach(click => {
|
|
1010
|
-
this.transport.sendHeatmapData(Object.assign({ type: 'click' }, click));
|
|
1012
|
+
this.transport.sendHeatmapData(Object.assign({ type: 'click', anonymousId: this.anonymousId, sessionId: this.sessionId }, click));
|
|
1011
1013
|
});
|
|
1012
1014
|
this.clickData = [];
|
|
1013
1015
|
}
|
|
1014
1016
|
// Send scroll data individually
|
|
1015
1017
|
if (this.scrollData.length > 0) {
|
|
1016
1018
|
this.scrollData.forEach(scroll => {
|
|
1017
|
-
this.transport.sendHeatmapData(Object.assign({ type: 'scroll' }, scroll));
|
|
1019
|
+
this.transport.sendHeatmapData(Object.assign({ type: 'scroll', anonymousId: this.anonymousId, sessionId: this.sessionId }, scroll));
|
|
1018
1020
|
});
|
|
1019
1021
|
this.scrollData = [];
|
|
1020
1022
|
}
|
|
1021
1023
|
// Send mouse moves individually
|
|
1022
1024
|
if (this.mouseMoveData.length > 0) {
|
|
1023
1025
|
this.mouseMoveData.forEach(move => {
|
|
1024
|
-
this.transport.sendHeatmapData(Object.assign({ type: 'mousemove' }, move));
|
|
1026
|
+
this.transport.sendHeatmapData(Object.assign({ type: 'mousemove', anonymousId: this.anonymousId, sessionId: this.sessionId }, move));
|
|
1025
1027
|
});
|
|
1026
1028
|
this.mouseMoveData = [];
|
|
1027
1029
|
}
|
|
@@ -13935,7 +13937,7 @@ class DevSkinSDK {
|
|
|
13935
13937
|
// Merge default heatmap config with user config
|
|
13936
13938
|
const heatmapConfig = Object.assign({ enabled: true, trackClicks: true, trackScroll: true, trackMouseMovement: true, mouseMoveSampling: 0.1 }, this.config.heatmapOptions);
|
|
13937
13939
|
this.config.heatmapOptions = heatmapConfig;
|
|
13938
|
-
this.heatmapCollector = new HeatmapCollector(this.config, this.transport);
|
|
13940
|
+
this.heatmapCollector = new HeatmapCollector(this.config, this.transport, this.anonymousId, this.sessionId);
|
|
13939
13941
|
this.heatmapCollector.start();
|
|
13940
13942
|
// Initialize screenshot collector and capture page
|
|
13941
13943
|
this.screenshotCollector = new ScreenshotCollector(this.config, this.transport);
|