@adobe/spacecat-shared-rum-api-client 2.14.1 → 2.15.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 +14 -0
- package/package.json +3 -3
- package/src/functions/cwv.js +5 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [@adobe/spacecat-shared-rum-api-client-v2.15.1](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-rum-api-client-v2.15.0...@adobe/spacecat-shared-rum-api-client-v2.15.1) (2024-12-05)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **deps:** update adobe fixes ([#471](https://github.com/adobe/spacecat-shared/issues/471)) ([3a66e97](https://github.com/adobe/spacecat-shared/commit/3a66e97e368eb618f4f36f0730f7646eb12b1145))
|
|
7
|
+
|
|
8
|
+
# [@adobe/spacecat-shared-rum-api-client-v2.15.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-rum-api-client-v2.14.1...@adobe/spacecat-shared-rum-api-client-v2.15.0) (2024-12-04)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* Include site level metrics in the CWV response ([#470](https://github.com/adobe/spacecat-shared/issues/470)) ([b465a96](https://github.com/adobe/spacecat-shared/commit/b465a962fc0c010207970e92f4e7b69407ffd6bc))
|
|
14
|
+
|
|
1
15
|
# [@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
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.
|
|
3
|
+
"version": "2.15.1",
|
|
4
4
|
"description": "Shared modules of the Spacecat Services - Rum API client",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"access": "public"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@adobe/fetch": "4.1.
|
|
38
|
+
"@adobe/fetch": "4.1.10",
|
|
39
39
|
"@adobe/helix-shared-wrap": "2.0.2",
|
|
40
|
-
"@adobe/helix-universal": "5.0.
|
|
40
|
+
"@adobe/helix-universal": "5.0.7",
|
|
41
41
|
"@adobe/spacecat-shared-utils": "1.22.4",
|
|
42
42
|
"@adobe/rum-distiller": "1.12.0",
|
|
43
43
|
"aws4": "1.13.2",
|
package/src/functions/cwv.js
CHANGED
|
@@ -93,7 +93,7 @@ function handler(rawBundles, opts = []) {
|
|
|
93
93
|
// counts metrics per each facet
|
|
94
94
|
METRICS.forEach((metric) => dataChunks.addSeries(metric, series[metric]));
|
|
95
95
|
|
|
96
|
-
//
|
|
96
|
+
// counts organic traffic per each facet
|
|
97
97
|
dataChunks.addSeries('organic', series.organic);
|
|
98
98
|
|
|
99
99
|
const patternsResult = dataChunks.facets.patternsDevices.reduce((acc, facet) => {
|
|
@@ -109,7 +109,7 @@ function handler(rawBundles, opts = []) {
|
|
|
109
109
|
metrics: [],
|
|
110
110
|
};
|
|
111
111
|
|
|
112
|
-
// Increment the total pageviews for pattern
|
|
112
|
+
// Increment the total pageviews and organic traffic for pattern
|
|
113
113
|
acc[pattern].pageviews += facet.weight;
|
|
114
114
|
acc[pattern].organic += facet.metrics.organic.sum;
|
|
115
115
|
|
|
@@ -117,6 +117,7 @@ function handler(rawBundles, opts = []) {
|
|
|
117
117
|
acc[pattern].metrics.push({
|
|
118
118
|
deviceType,
|
|
119
119
|
pageviews: facet.weight, // Pageviews for this device type
|
|
120
|
+
organic: facet.metrics.organic.sum, // Organic traffic for this device type
|
|
120
121
|
...calculateMetricsPercentile(facet.metrics),
|
|
121
122
|
});
|
|
122
123
|
|
|
@@ -134,7 +135,7 @@ function handler(rawBundles, opts = []) {
|
|
|
134
135
|
metrics: [],
|
|
135
136
|
};
|
|
136
137
|
|
|
137
|
-
// Increment the total pageviews for url
|
|
138
|
+
// Increment the total pageviews and organic traffic for url
|
|
138
139
|
acc[url].pageviews += facet.weight;
|
|
139
140
|
acc[url].organic += facet.metrics.organic.sum;
|
|
140
141
|
|
|
@@ -142,6 +143,7 @@ function handler(rawBundles, opts = []) {
|
|
|
142
143
|
acc[url].metrics.push({
|
|
143
144
|
deviceType,
|
|
144
145
|
pageviews: facet.weight, // Pageviews for this device type
|
|
146
|
+
organic: facet.metrics.organic.sum, // Organic traffic for this device type
|
|
145
147
|
...calculateMetricsPercentile(facet.metrics),
|
|
146
148
|
});
|
|
147
149
|
|