Comments (1)
By providing an feature for
https://github.com/GoogleChrome/web-vitals/
We would be able to gather RUM data immediately post-deployment in Google Analytics rather than wait 28 days for GSC data to refresh
This particular feature only as a dependency for Google Analytics, and due to the availability of buffering for performance observer entering https://www.chromestatus.com/feature/5118272741572608 the metrics before the monitoring code is run would also be made available, hence this can be delayed to run much later when the CPU is idling.
https://github.com/GoogleChromeLabs/web-vitals-report/blob/71b0879334798c732f460945ded5267cab5a36bf/src/js/analytics.js#L135
Events are sent to Google Analytics
There's console logging instead when gtag / analytics global is not present
Implementation
There is no negative consequence for monitoring to FCP/LCP (i.e. if we're loading the library on CPU idle).
Use requestidlecallback to send these only if support for this feature is present, even at the expense of not tracking some entries
Check for the gtag global to be defined, log to the console if gtag global is not available (useful for staging environments)
The script is loaded via type="module" so the extra JS doesn't get sent to browsers without support for PerformanceObserver.
from site-performance-tracker.
Related Issues (20)
- helper functions call undefined methods
- Annotation-based hooking HOT 2
- Make unit tests much better HOT 2
- GA4 ID admin setting persist
- Disable WpRocket Delay (this is already delayed)
- Disable custom dimensions for GA4 HOT 1
- Time to First Byte (TTFB) not reported HOT 1
- Update Readme to include the reference to the UI.
- Document support for GA4
- PHP notices in the UI when the plugin is first activated
- Bug: Interface in the UI HOT 4
- Move plugin settings procedural code into a class HOT 1
- Update package.json to newer, secure versions HOT 3
- Add a hash to the dist JS filename
- The ga_id is not initialised via the UI correctly
- GA delivery function throwing an error
- Release to Wordpress.org plug-in
- Allow smaller Web Vitals Tracking Ratio HOT 1
- Deliver Interaction to Next Paint metrics HOT 1
- Avoid hard-coding thresholds
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from site-performance-tracker.