@adobe/spacecat-shared-rum-api-client 2.14.1 → 2.15.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,10 @@
1
+ # [@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)
2
+
3
+
4
+ ### Features
5
+
6
+ * 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))
7
+
1
8
  # [@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
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/spacecat-shared-rum-api-client",
3
- "version": "2.14.1",
3
+ "version": "2.15.0",
4
4
  "description": "Shared modules of the Spacecat Services - Rum API client",
5
5
  "type": "module",
6
6
  "engines": {
@@ -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
- // count organic traffic per each facet
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