@adobe/spacecat-shared-rum-api-client 2.13.0 → 2.13.2
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/README.md +66 -47
- package/package.json +2 -2
- package/src/functions/cwv.js +14 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [@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
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **cwv:** include organic pageviews in the response ([#464](https://github.com/adobe/spacecat-shared/issues/464)) ([0aaf49f](https://github.com/adobe/spacecat-shared/commit/0aaf49fa82a0ed8ec1ee753eacac64ac6d8625a8))
|
|
7
|
+
|
|
8
|
+
# [@adobe/spacecat-shared-rum-api-client-v2.13.1](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-rum-api-client-v2.13.0...@adobe/spacecat-shared-rum-api-client-v2.13.1) (2024-11-30)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **deps:** update external fixes ([#465](https://github.com/adobe/spacecat-shared/issues/465)) ([d8ebb23](https://github.com/adobe/spacecat-shared/commit/d8ebb23fbd3d292479a4118dc6a9fb9931a31694))
|
|
14
|
+
|
|
1
15
|
# [@adobe/spacecat-shared-rum-api-client-v2.13.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-rum-api-client-v2.12.6...@adobe/spacecat-shared-rum-api-client-v2.13.0) (2024-11-28)
|
|
2
16
|
|
|
3
17
|
|
package/README.md
CHANGED
|
@@ -141,53 +141,72 @@ Lists all the experiments for a specified domain within the requested interval.
|
|
|
141
141
|
An example response:
|
|
142
142
|
|
|
143
143
|
```json
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
144
|
+
[
|
|
145
|
+
{
|
|
146
|
+
"type": "url",
|
|
147
|
+
"url": "https://www.aem.live/home",
|
|
148
|
+
"pageviews": 2620,
|
|
149
|
+
"organic": 1900,
|
|
150
|
+
"metrics": [
|
|
151
|
+
{
|
|
152
|
+
"deviceType": "desktop",
|
|
153
|
+
"pageviews": 2420,
|
|
154
|
+
"lcp": 2099.699999988079,
|
|
155
|
+
"lcpCount": 8,
|
|
156
|
+
"cls": 0.011145537287059668,
|
|
157
|
+
"clsCount": 7,
|
|
158
|
+
"inp": 8,
|
|
159
|
+
"inpCount": 5,
|
|
160
|
+
"ttfb": 548,
|
|
161
|
+
"ttfbCount": 16
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"deviceType": "mobile",
|
|
165
|
+
"pageviews": 100,
|
|
166
|
+
"lcp": 2454.2,
|
|
167
|
+
"lcpCount": 1,
|
|
168
|
+
"cls": 0.26956930913977606,
|
|
169
|
+
"clsCount": 1,
|
|
170
|
+
"inp": null,
|
|
171
|
+
"inpCount": 0,
|
|
172
|
+
"ttfb": 807.2999999858439,
|
|
173
|
+
"ttfbCount": 1
|
|
174
|
+
}
|
|
175
|
+
]
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"type": "url",
|
|
179
|
+
"url": "https://www.aem.live/docs/",
|
|
180
|
+
"pageviews": 1910,
|
|
181
|
+
"organic": 602,
|
|
182
|
+
"metrics": [
|
|
183
|
+
{
|
|
184
|
+
"deviceType": "desktop",
|
|
185
|
+
"pageviews": 1804,
|
|
186
|
+
"lcp": 665.9000000059605,
|
|
187
|
+
"lcpCount": 11,
|
|
188
|
+
"cls": 0.012401669733174766,
|
|
189
|
+
"clsCount": 11,
|
|
190
|
+
"inp": 32,
|
|
191
|
+
"inpCount": 8,
|
|
192
|
+
"ttfb": 253.20000000298023,
|
|
193
|
+
"ttfbCount": 12
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"deviceType": "mobile",
|
|
197
|
+
"pageviews": 106,
|
|
198
|
+
"lcp": 26276.5,
|
|
199
|
+
"lcpCount": 4,
|
|
200
|
+
"cls": null,
|
|
201
|
+
"clsCount": 5,
|
|
202
|
+
"inp": 48,
|
|
203
|
+
"inpCount": 1,
|
|
204
|
+
"ttfb": 86,
|
|
205
|
+
"ttfbCount": 5
|
|
206
|
+
}
|
|
207
|
+
]
|
|
208
|
+
}
|
|
209
|
+
]
|
|
191
210
|
|
|
192
211
|
```
|
|
193
212
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/spacecat-shared-rum-api-client",
|
|
3
|
-
"version": "2.13.
|
|
3
|
+
"version": "2.13.2",
|
|
4
4
|
"description": "Shared modules of the Spacecat Services - Rum API client",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"chai": "5.1.2",
|
|
48
|
-
"chai-as-promised": "8.0.
|
|
48
|
+
"chai-as-promised": "8.0.1",
|
|
49
49
|
"nock": "13.5.6",
|
|
50
50
|
"sinon": "19.0.2",
|
|
51
51
|
"sinon-chai": "4.0.0",
|
package/src/functions/cwv.js
CHANGED
|
@@ -93,6 +93,9 @@ 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
|
|
97
|
+
dataChunks.addSeries('organic', series.organic);
|
|
98
|
+
|
|
96
99
|
const patternsResult = dataChunks.facets.patternsDevices.reduce((acc, facet) => {
|
|
97
100
|
const [pattern, deviceType] = facet.value.split(DELIMITER);
|
|
98
101
|
const patternData = Object.values(urlToPatternMap).find((p) => p.pattern === pattern);
|
|
@@ -102,11 +105,13 @@ function handler(rawBundles, opts = []) {
|
|
|
102
105
|
name: patternData.name,
|
|
103
106
|
pattern,
|
|
104
107
|
pageviews: 0,
|
|
108
|
+
organic: 0,
|
|
105
109
|
metrics: [],
|
|
106
110
|
};
|
|
107
111
|
|
|
108
112
|
// Increment the total pageviews for pattern
|
|
109
113
|
acc[pattern].pageviews += facet.weight;
|
|
114
|
+
acc[pattern].organic += facet.metrics.organic.sum;
|
|
110
115
|
|
|
111
116
|
// Add metrics for the specific device type
|
|
112
117
|
acc[pattern].metrics.push({
|
|
@@ -125,11 +130,13 @@ function handler(rawBundles, opts = []) {
|
|
|
125
130
|
type: FACET_TYPE.URL,
|
|
126
131
|
url,
|
|
127
132
|
pageviews: 0,
|
|
133
|
+
organic: 0,
|
|
128
134
|
metrics: [],
|
|
129
135
|
};
|
|
130
136
|
|
|
131
137
|
// Increment the total pageviews for url
|
|
132
138
|
acc[url].pageviews += facet.weight;
|
|
139
|
+
acc[url].organic += facet.metrics.organic.sum;
|
|
133
140
|
|
|
134
141
|
// Add metrics for the specific device type
|
|
135
142
|
acc[url].metrics.push({
|
|
@@ -152,5 +159,11 @@ function handler(rawBundles, opts = []) {
|
|
|
152
159
|
|
|
153
160
|
export default {
|
|
154
161
|
handler,
|
|
155
|
-
checkpoints:
|
|
162
|
+
checkpoints: [
|
|
163
|
+
...METRICS.map((metric) => `cwv-${metric}`),
|
|
164
|
+
'utm',
|
|
165
|
+
'paid',
|
|
166
|
+
'email',
|
|
167
|
+
'enter',
|
|
168
|
+
],
|
|
156
169
|
};
|