@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.esm.js
CHANGED
|
@@ -924,7 +924,7 @@ class HeatmapCollector {
|
|
|
924
924
|
element: this.getElementSelector(target),
|
|
925
925
|
elementId: target.id || undefined,
|
|
926
926
|
elementClass: target.className || undefined,
|
|
927
|
-
pageUrl: window.location.
|
|
927
|
+
pageUrl: window.location.pathname,
|
|
928
928
|
timestamp: new Date().toISOString(),
|
|
929
929
|
viewportWidth: window.innerWidth,
|
|
930
930
|
viewportHeight: window.innerHeight,
|
|
@@ -952,7 +952,7 @@ class HeatmapCollector {
|
|
|
952
952
|
maxDepth: this.maxScrollDepth,
|
|
953
953
|
pageHeight: documentHeight,
|
|
954
954
|
viewportHeight: windowHeight,
|
|
955
|
-
pageUrl: window.location.
|
|
955
|
+
pageUrl: window.location.pathname,
|
|
956
956
|
timestamp: new Date().toISOString(),
|
|
957
957
|
};
|
|
958
958
|
this.scrollData.push(scrollData);
|
|
@@ -989,7 +989,7 @@ class HeatmapCollector {
|
|
|
989
989
|
const mouseMoveData = {
|
|
990
990
|
x: event.clientX + window.scrollX,
|
|
991
991
|
y: event.clientY + window.scrollY,
|
|
992
|
-
pageUrl: window.location.
|
|
992
|
+
pageUrl: window.location.pathname,
|
|
993
993
|
timestamp: new Date().toISOString(),
|
|
994
994
|
};
|
|
995
995
|
this.mouseMoveData.push(mouseMoveData);
|
|
@@ -13696,8 +13696,12 @@ class Transport {
|
|
|
13696
13696
|
this.sendToBackend('/v1/rum/events/batch', { events: dataArray }, useBeacon);
|
|
13697
13697
|
}
|
|
13698
13698
|
else if (type === 'heatmap') {
|
|
13699
|
-
// Heatmap expects array format
|
|
13700
|
-
this.sendToBackend(endpoint, {
|
|
13699
|
+
// Heatmap expects array format with apiKey and appId
|
|
13700
|
+
this.sendToBackend(endpoint, {
|
|
13701
|
+
heatmaps: dataArray,
|
|
13702
|
+
apiKey: this.config.apiKey,
|
|
13703
|
+
appId: this.config.appId
|
|
13704
|
+
}, useBeacon);
|
|
13701
13705
|
}
|
|
13702
13706
|
else {
|
|
13703
13707
|
// Send each item individually (network, performance, error)
|
|
@@ -13931,7 +13935,8 @@ class DevSkinSDK {
|
|
|
13931
13935
|
this.heatmapCollector.start();
|
|
13932
13936
|
// Initialize screenshot collector and capture page
|
|
13933
13937
|
this.screenshotCollector = new ScreenshotCollector(this.config, this.transport);
|
|
13934
|
-
|
|
13938
|
+
// Send only the pathname (not full URL) for consistent hashing
|
|
13939
|
+
this.screenshotCollector.captureAndSend(this.sessionId, window.location.pathname);
|
|
13935
13940
|
if (this.config.debug) {
|
|
13936
13941
|
console.log('[DevSkin] Heatmap collection enabled (always on)');
|
|
13937
13942
|
}
|
|
@@ -14002,7 +14007,7 @@ class DevSkinSDK {
|
|
|
14002
14007
|
userId: this.userId || undefined,
|
|
14003
14008
|
anonymousId: this.anonymousId || undefined,
|
|
14004
14009
|
properties: Object.assign(Object.assign({}, properties), this.getContextData()),
|
|
14005
|
-
pageUrl: window.location.
|
|
14010
|
+
pageUrl: window.location.pathname,
|
|
14006
14011
|
pageTitle: document.title,
|
|
14007
14012
|
};
|
|
14008
14013
|
(_a = this.transport) === null || _a === void 0 ? void 0 : _a.sendEvent(eventData);
|