@adobe/helix-rum-enhancer 2.26.2 → 2.26.3

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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [2.26.3](https://github.com/adobe/helix-rum-enhancer/compare/v2.26.2...v2.26.3) (2024-12-16)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * do not track repeating clicks ([#339](https://github.com/adobe/helix-rum-enhancer/issues/339)) ([f511a03](https://github.com/adobe/helix-rum-enhancer/commit/f511a03679188361326fbd3a8d68e650c39bea50))
7
+
1
8
  ## [2.26.2](https://github.com/adobe/helix-rum-enhancer/compare/v2.26.1...v2.26.2) (2024-12-11)
2
9
 
3
10
 
package/modules/index.js CHANGED
@@ -285,8 +285,16 @@ function mediaMCB(mutations) {
285
285
  }
286
286
 
287
287
  function addTrackingFromConfig() {
288
+ let lastSource;
289
+ let lastTarget;
288
290
  document.addEventListener('click', (event) => {
289
- sampleRUM('click', { target: targetSelector(event.target), source: sourceSelector(event.target) });
291
+ const source = sourceSelector(event.target);
292
+ const target = targetSelector(event.target);
293
+ if (source !== lastSource || target !== lastTarget) {
294
+ sampleRUM('click', { target, source });
295
+ lastSource = source;
296
+ lastTarget = target;
297
+ }
290
298
  });
291
299
  addCWVTracking();
292
300
  addFormTracking(window.document.body);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-rum-enhancer",
3
- "version": "2.26.2",
3
+ "version": "2.26.3",
4
4
  "description": "Helix RUM Enhancer",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -43,7 +43,7 @@
43
43
  "@web/test-runner-commands": "0.9.0",
44
44
  "@web/test-runner-mocha": "0.9.0",
45
45
  "@web/test-runner-playwright": "0.11.0",
46
- "c8": "10.1.2",
46
+ "c8": "10.1.3",
47
47
  "codecov": "3.8.3",
48
48
  "eslint": "8.57.1",
49
49
  "eslint-plugin-header": "3.1.1",
@@ -51,7 +51,7 @@
51
51
  "husky": "9.1.7",
52
52
  "jsdoc-to-markdown": "9.1.1",
53
53
  "junit-report-builder": "5.1.1",
54
- "lint-staged": "15.2.10",
54
+ "lint-staged": "15.2.11",
55
55
  "mocha": "11.0.1",
56
56
  "mocha-multi-reporters": "1.5.1",
57
57
  "rollup": "4.28.1",
package/src/index.js CHANGED
@@ -410,8 +410,16 @@
410
410
  });
411
411
  }
412
412
  function addTrackingFromConfig() {
413
+ let lastSource;
414
+ let lastTarget;
413
415
  document.addEventListener('click', (event) => {
414
- sampleRUM('click', { target: targetSelector(event.target), source: sourceSelector(event.target) });
416
+ const source = sourceSelector(event.target);
417
+ const target = targetSelector(event.target);
418
+ if (source !== lastSource || target !== lastTarget) {
419
+ sampleRUM('click', { target, source });
420
+ lastSource = source;
421
+ lastTarget = target;
422
+ }
415
423
  });
416
424
  addCWVTracking();
417
425
  addFormTracking(window.document.body);
package/src/index.md5 CHANGED
@@ -1 +1 @@
1
- b33e2bbaa1ad5542ff6a6343af9750b6
1
+ 6562b464055f9498b72eab295021c297