@devskin/browser-sdk 1.0.37 → 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.
@@ -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.href,
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.href,
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.href,
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, { heatmaps: dataArray }, useBeacon);
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)
@@ -14003,7 +14007,7 @@ class DevSkinSDK {
14003
14007
  userId: this.userId || undefined,
14004
14008
  anonymousId: this.anonymousId || undefined,
14005
14009
  properties: Object.assign(Object.assign({}, properties), this.getContextData()),
14006
- pageUrl: window.location.href,
14010
+ pageUrl: window.location.pathname,
14007
14011
  pageTitle: document.title,
14008
14012
  };
14009
14013
  (_a = this.transport) === null || _a === void 0 ? void 0 : _a.sendEvent(eventData);