@adobe/spacecat-shared-rum-api-client 2.26.0 → 2.27.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 +7 -0
- package/package.json +1 -1
- package/src/functions/form-vitals.js +6 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [@adobe/spacecat-shared-rum-api-client-v2.27.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-rum-api-client-v2.26.0...@adobe/spacecat-shared-rum-api-client-v2.27.0) (2025-05-26)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* including traffic acquisition data in forms oppoty ([#754](https://github.com/adobe/spacecat-shared/issues/754)) ([616ebd3](https://github.com/adobe/spacecat-shared/commit/616ebd3b0302d67693db8bce7b55224ff7915778))
|
|
7
|
+
|
|
1
8
|
# [@adobe/spacecat-shared-rum-api-client-v2.26.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-rum-api-client-v2.25.2...@adobe/spacecat-shared-rum-api-client-v2.26.0) (2025-05-20)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import { DataChunks } from '@adobe/rum-distiller';
|
|
14
|
+
import trafficAcquisition from './traffic-acquisition.js';
|
|
14
15
|
import { generateKey, DELIMITER, loadBundles } from '../utils.js';
|
|
15
16
|
|
|
16
17
|
const METRICS = ['formview', 'formengagement', 'formsubmit'];
|
|
@@ -230,10 +231,10 @@ function handler(bundles) {
|
|
|
230
231
|
);
|
|
231
232
|
|
|
232
233
|
// traffic acquisition data per url - uncomment this when required
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
234
|
+
const trafficByUrl = trafficAcquisition.handler(bundles);
|
|
235
|
+
const trafficByUrlMap = Object.fromEntries(
|
|
236
|
+
trafficByUrl.map(({ url, ...item }) => [url, item]),
|
|
237
|
+
);
|
|
237
238
|
const formVitals = {};
|
|
238
239
|
|
|
239
240
|
globalFormSourceSet.forEach((source) => {
|
|
@@ -256,7 +257,7 @@ function handler(bundles) {
|
|
|
256
257
|
acc[key] = acc[key] || initializeResult(url);
|
|
257
258
|
acc[key].pageview[userAgent] = acc[key].pageview[userAgent] || weight;
|
|
258
259
|
// Enable traffic acquisition for persistence by uncommenting this line
|
|
259
|
-
|
|
260
|
+
acc[key].trafficacquisition = trafficByUrlMap[url];
|
|
260
261
|
acc[key].formsource = source;
|
|
261
262
|
// filter out user-agents with no form vitals
|
|
262
263
|
METRICS.filter((metric) => metrics[metric].sum)
|