@adobe/helix-rum-enhancer 2.4.0 → 2.5.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 +14 -0
- package/package.json +2 -2
- package/src/index.js +6 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [2.5.0](https://github.com/adobe/helix-rum-enhancer/compare/v2.4.1...v2.5.0) (2024-04-16)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* report source and target along with lcp element ([bebb429](https://github.com/adobe/helix-rum-enhancer/commit/bebb4291a1cc5fe07af31f87988c84ba07e57695))
|
|
7
|
+
|
|
8
|
+
## [2.4.1](https://github.com/adobe/helix-rum-enhancer/compare/v2.4.0...v2.4.1) (2024-04-08)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* broken code in the utm tracking ([d1695dd](https://github.com/adobe/helix-rum-enhancer/commit/d1695ddf62b316d3cc06c75c444f859a271cff2e))
|
|
14
|
+
|
|
1
15
|
# [2.4.0](https://github.com/adobe/helix-rum-enhancer/compare/v2.3.1...v2.4.0) (2024-03-22)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/helix-rum-enhancer",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
4
4
|
"description": "Helix RUM Enhancer",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"jsdoc-to-markdown": "8.0.1",
|
|
43
43
|
"junit-report-builder": "3.2.1",
|
|
44
44
|
"lint-staged": "15.2.2",
|
|
45
|
-
"mocha": "10.
|
|
45
|
+
"mocha": "10.4.0",
|
|
46
46
|
"mocha-multi-reporters": "1.5.1",
|
|
47
47
|
"semantic-release": "22.0.12"
|
|
48
48
|
},
|
package/src/index.js
CHANGED
|
@@ -111,6 +111,11 @@ function addCWVTracking() {
|
|
|
111
111
|
const storeCWV = (measurement) => {
|
|
112
112
|
const data = { cwv: {} };
|
|
113
113
|
data.cwv[measurement.name] = measurement.value;
|
|
114
|
+
if (measurement.name === 'LCP' && measurement.entries.length > 0) {
|
|
115
|
+
const { element } = measurement.entries.pop();
|
|
116
|
+
data.target = sampleRUM.targetselector(element);
|
|
117
|
+
data.source = sampleRUM.sourceselector(element) || element.outerHTML.slice(0, 30);
|
|
118
|
+
}
|
|
114
119
|
sampleRUM('cwv', data);
|
|
115
120
|
};
|
|
116
121
|
|
|
@@ -228,7 +233,7 @@ function addUTMParametersTracking() {
|
|
|
228
233
|
const usp = new URLSearchParams(window.location.search);
|
|
229
234
|
[...usp.entries()]
|
|
230
235
|
.filter(([key]) => key.startsWith('utm_'))
|
|
231
|
-
.filter(([key]) => key !== 'utm_id')
|
|
236
|
+
.filter(([key]) => key !== 'utm_id')
|
|
232
237
|
.forEach(([source, target]) => sampleRUM('utm', { source, target }));
|
|
233
238
|
}
|
|
234
239
|
|