@adobe/helix-rum-enhancer
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -0,1 +1,8 @@ | ||
## [1.0.1](https://github.com/adobe/helix-rum-enhancer/compare/v1.0.0...v1.0.1) (2022-07-08) | ||
### Bug Fixes | ||
* **cwv:** use correct checkpoint when reporting cwv values, don't load script twice ([56458c8](https://github.com/adobe/helix-rum-enhancer/commit/56458c8e8a34ad93fb547de13ad8ae430e91eaae)) | ||
# 1.0.0 (2022-07-08) | ||
@@ -2,0 +9,0 @@ |
{ | ||
"name": "@adobe/helix-rum-enhancer", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Helix RUM Enhancer", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -15,3 +15,3 @@ # Helix RUM Enhancer | ||
This library is meant to be used in conjunction with and loaded by the `sampleRUM` function found in [Helix Project Boilerplate](https://github.com/adobe/helix-project-boilerplate/blob/main/scripts/scripts.js) or (Helix RUM JS)[https://github.com/adobe/helix-rum-js]. | ||
This library is meant to be used in conjunction with and loaded by the `sampleRUM` function found in [Helix Project Boilerplate](https://github.com/adobe/helix-project-boilerplate/blob/main/scripts/scripts.js) or [Helix RUM JS](https://github.com/adobe/helix-rum-js). | ||
@@ -18,0 +18,0 @@ It will add following new checkpoints: |
@@ -58,3 +58,7 @@ /* | ||
sampleRUM.drain('cwv', ((sendPing) => { | ||
sampleRUM.drain('cwv', (() => { | ||
if (document.querySelector('script[src="https://rum.hlx.page/.rum/web-vitals/dist/web-vitals.iife.js"]')) { | ||
// web vitals script has been loaded already | ||
return; | ||
} | ||
// use classic script to avoid CORS issues | ||
@@ -67,3 +71,3 @@ const script = document.createElement('script'); | ||
data.cwv[measurement.name] = measurement.value; | ||
sendPing(data); | ||
sampleRUM('cwv', data); | ||
}; | ||
@@ -70,0 +74,0 @@ // When loading `web-vitals` using a classic script, all the public |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
30145
152