alphana-sdk 1.8.0 → 1.9.0

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.
@@ -64,15 +64,11 @@ interface TrackerConfig {
64
64
  */
65
65
  trackLogs?: boolean;
66
66
  /**
67
- * List of page paths for which heatmap data should be captured client-side.
68
- * Paths should match the dashboard "Heatmap pages" list (decoded Unicode is
69
- * fine the SDK normalizes percent-encoding vs `window.location` mismatches).
70
- *
71
- * If empty or undefined, the SDK may still collect moves locally, but the
72
- * backend only persists points when the app has at least one registered
73
- * heatmap page and the path matches.
74
- *
75
- * Example: `heatmapPages: ["/", "/pricing", "/dashboard"]`
67
+ * @deprecated Optional client-side path filter only. Heatmap pages are
68
+ * registered in the Alphana dashboard; the backend persists points only for
69
+ * those paths. Leave unset so the SDK collects on every page and the server
70
+ * filters — no SDK configuration is required when you add a page in the
71
+ * dashboard.
76
72
  */
77
73
  heatmapPages?: string[];
78
74
  /**
@@ -162,11 +158,23 @@ interface HeatmapPoint {
162
158
  pw?: number;
163
159
  /** Page scrollHeight at the time of the event (used for accurate remapping) */
164
160
  ph?: number;
161
+ /** Viewport (innerWidth) at capture time — disambiguates responsive layouts. */
162
+ vw?: number;
165
163
  type: "move" | "click" | "scroll";
166
164
  path: string;
167
165
  timestamp: number;
168
166
  /** Text/label of the clicked element — only present on click events. */
169
167
  target?: string;
168
+ /**
169
+ * Stable CSS selector of the anchored element (clicks only). Lets the
170
+ * dashboard place the point relative to the element in the screenshot, so it
171
+ * stays accurate even when the visitor's layout differed from the capture.
172
+ */
173
+ selector?: string;
174
+ /** Click X as a fraction (0–1) of the anchored element's width (clicks only). */
175
+ relX?: number;
176
+ /** Click Y as a fraction (0–1) of the anchored element's height (clicks only). */
177
+ relY?: number;
170
178
  }
171
179
  interface RageClick {
172
180
  path: string;
@@ -64,15 +64,11 @@ interface TrackerConfig {
64
64
  */
65
65
  trackLogs?: boolean;
66
66
  /**
67
- * List of page paths for which heatmap data should be captured client-side.
68
- * Paths should match the dashboard "Heatmap pages" list (decoded Unicode is
69
- * fine the SDK normalizes percent-encoding vs `window.location` mismatches).
70
- *
71
- * If empty or undefined, the SDK may still collect moves locally, but the
72
- * backend only persists points when the app has at least one registered
73
- * heatmap page and the path matches.
74
- *
75
- * Example: `heatmapPages: ["/", "/pricing", "/dashboard"]`
67
+ * @deprecated Optional client-side path filter only. Heatmap pages are
68
+ * registered in the Alphana dashboard; the backend persists points only for
69
+ * those paths. Leave unset so the SDK collects on every page and the server
70
+ * filters — no SDK configuration is required when you add a page in the
71
+ * dashboard.
76
72
  */
77
73
  heatmapPages?: string[];
78
74
  /**
@@ -162,11 +158,23 @@ interface HeatmapPoint {
162
158
  pw?: number;
163
159
  /** Page scrollHeight at the time of the event (used for accurate remapping) */
164
160
  ph?: number;
161
+ /** Viewport (innerWidth) at capture time — disambiguates responsive layouts. */
162
+ vw?: number;
165
163
  type: "move" | "click" | "scroll";
166
164
  path: string;
167
165
  timestamp: number;
168
166
  /** Text/label of the clicked element — only present on click events. */
169
167
  target?: string;
168
+ /**
169
+ * Stable CSS selector of the anchored element (clicks only). Lets the
170
+ * dashboard place the point relative to the element in the screenshot, so it
171
+ * stays accurate even when the visitor's layout differed from the capture.
172
+ */
173
+ selector?: string;
174
+ /** Click X as a fraction (0–1) of the anchored element's width (clicks only). */
175
+ relX?: number;
176
+ /** Click Y as a fraction (0–1) of the anchored element's height (clicks only). */
177
+ relY?: number;
170
178
  }
171
179
  interface RageClick {
172
180
  path: string;