@adobe/spacecat-shared-rum-api-client 2.39.0 → 2.40.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,22 @@
1
+ # [@adobe/spacecat-shared-rum-api-client-v2.40.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-rum-api-client-v2.39.1...@adobe/spacecat-shared-rum-api-client-v2.40.0) (2025-11-28)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * revert release to node 24 ([#1183](https://github.com/adobe/spacecat-shared/issues/1183)) ([e662259](https://github.com/adobe/spacecat-shared/commit/e66225930c1f56fbc6e8898d37d06f777e6ee356)), closes [#1182](https://github.com/adobe/spacecat-shared/issues/1182)
7
+
8
+
9
+ ### Features
10
+
11
+ * Add LCP and Engagement Metrics to Total Metrics Query ([#1175](https://github.com/adobe/spacecat-shared/issues/1175)) ([acbadbd](https://github.com/adobe/spacecat-shared/commit/acbadbd208787143b2aafe3916fa37710e02af26))
12
+
13
+ # [@adobe/spacecat-shared-rum-api-client-v2.39.1](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-rum-api-client-v2.39.0...@adobe/spacecat-shared-rum-api-client-v2.39.1) (2025-11-28)
14
+
15
+
16
+ ### Bug Fixes
17
+
18
+ * update to node 24 ([#1179](https://github.com/adobe/spacecat-shared/issues/1179)) ([0e60c0a](https://github.com/adobe/spacecat-shared/commit/0e60c0ab791b47662d07822f7c93009a8f7048fd))
19
+
1
20
  # [@adobe/spacecat-shared-rum-api-client-v2.39.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-rum-api-client-v2.38.10...@adobe/spacecat-shared-rum-api-client-v2.39.0) (2025-11-24)
2
21
 
3
22
 
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@adobe/spacecat-shared-rum-api-client",
3
- "version": "2.39.0",
3
+ "version": "2.40.0",
4
4
  "description": "Shared modules of the Spacecat Services - Rum API client",
5
5
  "type": "module",
6
6
  "engines": {
7
- "node": ">=22.0.0 <23.0.0",
7
+ "node": ">=22.0.0 <25.0.0",
8
8
  "npm": ">=10.9.0 <12.0.0"
9
9
  },
10
10
  "main": "src/index.js",
@@ -39,7 +39,7 @@
39
39
  "@adobe/helix-shared-wrap": "2.0.2",
40
40
  "@adobe/helix-universal": "5.3.0",
41
41
  "@adobe/rum-distiller": "1.20.8",
42
- "@adobe/spacecat-shared-utils": "1.66.0",
42
+ "@adobe/spacecat-shared-utils": "1.81.1",
43
43
  "aws4": "1.13.2",
44
44
  "urijs": "1.19.11"
45
45
  },
@@ -20,18 +20,25 @@ function handler(bundles) {
20
20
  dataChunks.addSeries('clicks', (bundle) => (bundle.events.some((e) => e.checkpoint === 'click')
21
21
  ? bundle.weight
22
22
  : 0));
23
- const totalPageViews = dataChunks?.totals?.traffic_domain?.weight;
23
+ dataChunks.addSeries('lcp', series.lcp);
24
+ dataChunks.addSeries('engagement', series.engagement);
25
+ const totalPageViews = dataChunks?.totals?.traffic_domain?.sum;
26
+ const totalLCP = dataChunks?.totals?.lcp?.percentile(75) || null;
24
27
  const sum = dataChunks?.totals?.clicks?.sum ?? 0;
25
28
  const weight = dataChunks?.totals?.clicks?.weight ?? 0;
26
29
  const totalCTR = weight !== 0 ? sum / weight : 0;
30
+ const engagementCount = dataChunks?.totals?.engagement?.sum ?? 0;
31
+
27
32
  return {
28
33
  totalPageViews,
29
34
  totalCTR,
30
35
  totalClicks: sum,
36
+ totalLCP,
37
+ totalEngagement: engagementCount,
31
38
  };
32
39
  }
33
40
 
34
41
  export default {
35
42
  handler,
36
- checkpoints: ['click'],
43
+ checkpoints: ['click', 'cwv-lcp', 'viewmedia', 'viewblock'],
37
44
  };