How to Measure Web Vitals: Understanding Lab and Field Data

How to Measure Web Vitals: Understanding Lab and Field Data

How to Measure Speed?

Website performance varies greatly based on users’ devices, network speeds, and environments. For example, loading a page on a fast office network will likely feel different compared to loading it on public WiFi. To measure performance effectively, we use two types of data: lab data and field data, gathered through various tools.


Lab Data vs. Field Data vs RUM

  • Lab Data: Collected in controlled environments with predefined device and network settings. While it provides reproducible results and helps in debugging, it may not capture real-world bottlenecks. You must mirror your users' conditions as closely as possible to get accurate results.
  • Field Data (CrUX - Chrome User Experience Report): Field data from CrUX is gathered from real Chrome users who meet specific eligibility criteria set by Google. It provides aggregate insights into how users experience your website in real-world conditions. However, CrUX offers a limited set of metrics (primarily Core Web Vitals). It focuses on a broader view, meaning it doesn’t provide granular details like individual session tracking or comprehensive debugging information.
  • RUM (Real User Monitoring): RUM collects detailed performance data directly from your site using a JavaScript snippet provided by RUM vendors (e.g. RUMvision, Auditzy, etc.). Unlike CrUX, RUM offers a more comprehensive, granular view of user interactions, providing detailed metrics and in-depth insights. RUM allows you to capture a wider range of performance indicators, including user flows, geographic breakdowns, and device-specific issues. It helps track user sessions individually, enabling better debugging and detailed performance diagnostics.


Understanding the Chrome UX Report (CrUX)

CrUX is a dataset that shows how real-world Chrome users experience websites. It is the backbone of Google’s Core Web Vitals, which measures critical metrics like Largest Contentful Paint (LCP), Interaction to Next Paint (INP), and Cumulative Layout Shift (CLS). CrUX data is collected from users worldwide and is available through tools like PageSpeed Insights, providing site owners with valuable insight into how their site performs globally.

However, not every site or page is represented in CrUX. Only public websites with sufficient traffic are included to ensure the dataset is statistically significant.

To view CrUX data on PageSpeed Insights:

  1. Go to PageSpeed Insights.
  2. Enter your page’s URL and click "Analyze."
  3. You’ll receive a report showing both lab data from Lighthouse and field data from CrUX, helping you identify both potential issues in controlled tests and actual problems your users face.

For example -

CrUX data (Mobile)
CrUX data (Desktop)
Lighthouse Report (Mobile)
Lighthouse Report (Desktop)


Why do Lab and Field Data Differ?

Lab data is collected in controlled conditions where variables like device type, browser, and network speed are fixed. This allows for consistent testing and debugging but doesn’t account for real-world variations. For example, your users might have slower networks, different devices, or unpredictable connectivity (e.g., in elevators or rural areas). These factors are captured in field data, which shows how your site performs in diverse environments, making it more representative of your user base.


Why CrUX Data Can Differ from Your RUM Data?

CrUX data and RUM data differ because CrUX gathers performance metrics from real Chrome users globally, focusing on broad trends and Core Web Vitals, while RUM captures detailed, session-specific data from all your site visitors across various browsers. CrUX provides aggregated data over a 28-day period, which may not reflect the nuances of your specific user base. RUM, on the other hand, offers real-time insights into your actual users' experiences, including granular details like user interactions and performance across different devices and regions. This makes RUM more tailored for in-depth analysis and debugging, whereas CrUX is better for benchmarking and overall performance trends.



deepesh sharma

Software Developer

6 个月

Very informative Abhishek Singh

Sidharth dhiman

Software developer-1 @Zupee (Backend) | Write tech blogs in anime style |

6 个月

Love this

Samar Khan

Principal Engineer at Jacobs

6 个月

Insightful

要查看或添加评论,请登录

Abhishek Singh的更多文章

社区洞察

其他会员也浏览了