@adobe/spacecat-shared-rum-api-client 2.39.1 → 2.40.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 +19 -0
- package/package.json +3 -3
- package/src/functions/total-metrics.js +9 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
# [@adobe/spacecat-shared-rum-api-client-v2.40.1](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-rum-api-client-v2.40.0...@adobe/spacecat-shared-rum-api-client-v2.40.1) (2025-12-04)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **deps:** update dependency @adobe/rum-distiller to v1.21.0 ([#1217](https://github.com/adobe/spacecat-shared/issues/1217)) ([acf206f](https://github.com/adobe/spacecat-shared/commit/acf206fd35b41489a44b323aa7865ffe244ace0e))
|
|
7
|
+
|
|
8
|
+
# [@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)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* 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)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
* 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))
|
|
19
|
+
|
|
1
20
|
# [@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)
|
|
2
21
|
|
|
3
22
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/spacecat-shared-rum-api-client",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.40.1",
|
|
4
4
|
"description": "Shared modules of the Spacecat Services - Rum API client",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"@adobe/fetch": "4.2.3",
|
|
39
39
|
"@adobe/helix-shared-wrap": "2.0.2",
|
|
40
40
|
"@adobe/helix-universal": "5.3.0",
|
|
41
|
-
"@adobe/rum-distiller": "1.
|
|
42
|
-
"@adobe/spacecat-shared-utils": "1.81.
|
|
41
|
+
"@adobe/rum-distiller": "1.21.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
|
-
|
|
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
|
};
|