@devskin/browser-sdk 1.0.36 → 1.0.38
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 +12 -7
- package/dist/devskin.cjs.js.map +1 -1
- package/dist/devskin.esm.js +12 -7
- package/dist/devskin.esm.js.map +1 -1
- package/dist/devskin.umd.js +12 -7
- 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/dist/transport.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/devskin.cjs.js
CHANGED
|
@@ -928,7 +928,7 @@ class HeatmapCollector {
|
|
|
928
928
|
element: this.getElementSelector(target),
|
|
929
929
|
elementId: target.id || undefined,
|
|
930
930
|
elementClass: target.className || undefined,
|
|
931
|
-
pageUrl: window.location.
|
|
931
|
+
pageUrl: window.location.pathname,
|
|
932
932
|
timestamp: new Date().toISOString(),
|
|
933
933
|
viewportWidth: window.innerWidth,
|
|
934
934
|
viewportHeight: window.innerHeight,
|
|
@@ -956,7 +956,7 @@ class HeatmapCollector {
|
|
|
956
956
|
maxDepth: this.maxScrollDepth,
|
|
957
957
|
pageHeight: documentHeight,
|
|
958
958
|
viewportHeight: windowHeight,
|
|
959
|
-
pageUrl: window.location.
|
|
959
|
+
pageUrl: window.location.pathname,
|
|
960
960
|
timestamp: new Date().toISOString(),
|
|
961
961
|
};
|
|
962
962
|
this.scrollData.push(scrollData);
|
|
@@ -993,7 +993,7 @@ class HeatmapCollector {
|
|
|
993
993
|
const mouseMoveData = {
|
|
994
994
|
x: event.clientX + window.scrollX,
|
|
995
995
|
y: event.clientY + window.scrollY,
|
|
996
|
-
pageUrl: window.location.
|
|
996
|
+
pageUrl: window.location.pathname,
|
|
997
997
|
timestamp: new Date().toISOString(),
|
|
998
998
|
};
|
|
999
999
|
this.mouseMoveData.push(mouseMoveData);
|
|
@@ -13700,8 +13700,12 @@ class Transport {
|
|
|
13700
13700
|
this.sendToBackend('/v1/rum/events/batch', { events: dataArray }, useBeacon);
|
|
13701
13701
|
}
|
|
13702
13702
|
else if (type === 'heatmap') {
|
|
13703
|
-
// Heatmap expects array format
|
|
13704
|
-
this.sendToBackend(endpoint, {
|
|
13703
|
+
// Heatmap expects array format with apiKey and appId
|
|
13704
|
+
this.sendToBackend(endpoint, {
|
|
13705
|
+
heatmaps: dataArray,
|
|
13706
|
+
apiKey: this.config.apiKey,
|
|
13707
|
+
appId: this.config.appId
|
|
13708
|
+
}, useBeacon);
|
|
13705
13709
|
}
|
|
13706
13710
|
else {
|
|
13707
13711
|
// Send each item individually (network, performance, error)
|
|
@@ -13935,7 +13939,8 @@ class DevSkinSDK {
|
|
|
13935
13939
|
this.heatmapCollector.start();
|
|
13936
13940
|
// Initialize screenshot collector and capture page
|
|
13937
13941
|
this.screenshotCollector = new ScreenshotCollector(this.config, this.transport);
|
|
13938
|
-
|
|
13942
|
+
// Send only the pathname (not full URL) for consistent hashing
|
|
13943
|
+
this.screenshotCollector.captureAndSend(this.sessionId, window.location.pathname);
|
|
13939
13944
|
if (this.config.debug) {
|
|
13940
13945
|
console.log('[DevSkin] Heatmap collection enabled (always on)');
|
|
13941
13946
|
}
|
|
@@ -14006,7 +14011,7 @@ class DevSkinSDK {
|
|
|
14006
14011
|
userId: this.userId || undefined,
|
|
14007
14012
|
anonymousId: this.anonymousId || undefined,
|
|
14008
14013
|
properties: Object.assign(Object.assign({}, properties), this.getContextData()),
|
|
14009
|
-
pageUrl: window.location.
|
|
14014
|
+
pageUrl: window.location.pathname,
|
|
14010
14015
|
pageTitle: document.title,
|
|
14011
14016
|
};
|
|
14012
14017
|
(_a = this.transport) === null || _a === void 0 ? void 0 : _a.sendEvent(eventData);
|