@adobe/spacecat-shared-rum-api-client 2.13.2 → 2.14.1

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,17 @@
1
+ # [@adobe/spacecat-shared-rum-api-client-v2.14.1](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-rum-api-client-v2.14.0...@adobe/spacecat-shared-rum-api-client-v2.14.1) (2024-12-04)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **deps:** update dependency @adobe/rum-distiller to v1.12.0 ([#469](https://github.com/adobe/spacecat-shared/issues/469)) ([d0787b3](https://github.com/adobe/spacecat-shared/commit/d0787b380fccd89f180d86a99a1e7656268a6ca6)), closes [#8203](https://github.com/adobe/spacecat-shared/issues/8203)
7
+
8
+ # [@adobe/spacecat-shared-rum-api-client-v2.14.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-rum-api-client-v2.13.2...@adobe/spacecat-shared-rum-api-client-v2.14.0) (2024-12-04)
9
+
10
+
11
+ ### Features
12
+
13
+ * introduce form button clicks in form vitals ([#468](https://github.com/adobe/spacecat-shared/issues/468)) ([3907092](https://github.com/adobe/spacecat-shared/commit/39070920a9472f063e6ee11c867ed047107f001d))
14
+
1
15
  # [@adobe/spacecat-shared-rum-api-client-v2.13.2](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-rum-api-client-v2.13.1...@adobe/spacecat-shared-rum-api-client-v2.13.2) (2024-12-02)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/spacecat-shared-rum-api-client",
3
- "version": "2.13.2",
3
+ "version": "2.14.1",
4
4
  "description": "Shared modules of the Spacecat Services - Rum API client",
5
5
  "type": "module",
6
6
  "engines": {
@@ -39,7 +39,7 @@
39
39
  "@adobe/helix-shared-wrap": "2.0.2",
40
40
  "@adobe/helix-universal": "5.0.6",
41
41
  "@adobe/spacecat-shared-utils": "1.22.4",
42
- "@adobe/rum-distiller": "1.11.1",
42
+ "@adobe/rum-distiller": "1.12.0",
43
43
  "aws4": "1.13.2",
44
44
  "urijs": "^1.19.11"
45
45
  },
@@ -14,7 +14,7 @@ import { DataChunks } from '@adobe/rum-distiller';
14
14
  import { generateKey, DELIMITER, loadBundles } from '../utils.js';
15
15
 
16
16
  const FORM_SOURCE = ['.form', '.marketo', '.marketo-form'];
17
- const METRICS = ['formview', 'formengagement', 'formsubmit'];
17
+ const METRICS = ['formview', 'formengagement', 'formsubmit', 'formbuttonclick'];
18
18
 
19
19
  function initializeResult(url) {
20
20
  return {
@@ -22,6 +22,7 @@ function initializeResult(url) {
22
22
  formsubmit: {},
23
23
  formview: {},
24
24
  formengagement: {},
25
+ formbuttonclick: {},
25
26
  pageview: {},
26
27
  };
27
28
  }
@@ -39,6 +40,12 @@ const metricFns = {
39
40
  const formSubmit = bundle.events.find((e) => e.checkpoint === 'formsubmit');
40
41
  return formSubmit ? bundle.weight : 0;
41
42
  },
43
+ formbuttonclick: (bundle) => {
44
+ const formButtonClick = bundle.events.find((e) => e.checkpoint === 'click' && e.source
45
+ && /\bform\b/.test(e.source.toLowerCase())
46
+ && /\bbutton\b/.test(e.source.toLowerCase()));
47
+ return formButtonClick ? bundle.weight : 0;
48
+ },
42
49
  };
43
50
 
44
51
  function containsFormVitals(row) {