Question regarding Web Core Vitals Crux API vs Pagespeed

321 views
Skip to first unread message

Shimaa El-Srougy

unread,
Aug 7, 2023, 4:40:31 PM8/7/23
to Chrome UX Report (Discussions)
Hi All, 
        If anyone can please help me understand why there is a difference between the LCP number pulled directly from Crux API vs Pagespeed top view(not simulated LCP). Does the API go against a different dataset or what. Its very confusing when trying to validate the numbers. Any info would be greatly appreciated.

Rick Viscomi

unread,
Aug 7, 2023, 4:54:23 PM8/7/23
to Shimaa El-Srougy, Chrome UX Report (Discussions)
Hi,

PSI field data is powered by CrUX, so the data you get in one should be the same as the other.

If you're seeing discrepancies, make sure you're looking at data for the same page (not origin-level) and the same device type (desktop vs mobile).

Otherwise if you're still getting conflicting information, share your URL and we can investigate.


Rick

On Mon, Aug 7, 2023 at 4:40 PM 'Shimaa El-Srougy' via Chrome UX Report (Discussions) <chrome-u...@chromium.org> wrote:
Hi All, 
        If anyone can please help me understand why there is a difference between the LCP number pulled directly from Crux API vs Pagespeed top view(not simulated LCP). Does the API go against a different dataset or what. Its very confusing when trying to validate the numbers. Any info would be greatly appreciated.

--
You received this message because you are subscribed to the Google Groups "Chrome UX Report (Discussions)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chrome-ux-repo...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chrome-ux-report/cb3a2003-34f8-4da6-a753-2b7db9724199n%40chromium.org.

Shimaa El-Srougy

unread,
Aug 7, 2023, 5:18:46 PM8/7/23
to Rick Viscomi, Chrome UX Report (Discussions)
Thank you guys, Rick when comparing the numbers I want to make sure I’m looking at it from correct angle.  for example. I ran the report on July 25 and I get lcp xx when I look at the pagespeed today it says past 28day. Is the backend data based on June dataset as the July data will be released tomorrow the 2nd Tuesday of the month?. Just need to know if there is a possible gap or a reset. 
--
Shimaa M. El-Srougy
Web Coordinator - GCA - GIT Marketing Global App & Americas 
Colgate-Palmolive Company, 909 River Road, Piscataway Township, NJ 08854

Rick Viscomi

unread,
Aug 7, 2023, 5:24:07 PM8/7/23
to Shimaa El-Srougy, Chrome UX Report (Discussions)
Ah, so if I understand correctly it sounds like you're comparing the June data (from the CrUX Dashboard) to the most recent 28 days of data in PageSpeed Insights. It's expected for those to be different as they cover different time periods.

Shimaa El-Srougy

unread,
Aug 7, 2023, 5:32:54 PM8/7/23
to Rick Viscomi, Chrome UX Report (Discussions)
So I pulled the data from the curx api but I understood that those numbers are only released on monthly bases on 2nd Tuesday of each month for previous month. Now we have RUM data and I pull the data from that exact timeframe to compare. But the ask is pagespeed why is that different than crux, but that seems to be off by .2 -.8 secs. I noticed that it says last 28 days. So is pagespeed real-time kinda or is it not good to compare on same time frame. If it’s going against crux and data should be the same it should not matter. Or am i missing something? 

Rick Viscomi

unread,
Aug 7, 2023, 8:45:45 PM8/7/23
to Shimaa El-Srougy, Chrome UX Report (Discussions)
There are a few different CrUX tools, so it might be worth clarifying the distinctions between them all.

image.png

The CrUX API updates every day and covers the previous 28 days of data. PageSpeed Insights is powered by this data source.

If you're querying the CrUX API, you can see the exact date range it covers with the collectionPeriod response field:

// Today's API responses cover July 9 – August 5
{
    "firstDate": {
        "year": 2023,
        "month": 7,
        "day": 9
    },
    "lastDate": {
        "year": 2023,
        "month": 8,
        "day": 5
    }
}

image.png

The CrUX dataset on BigQuery updates once a month and covers 28 days of data from the previous calendar month. So for example, tomorrow's release will cover the first 28 days of July (202307). The CrUX Dashboard is powered by this data source.

You also mentioned RUM, so it's worth noting that there can be differences between CrUX and RUM data too.

If there's anything that's still unclear, feel free to share screenshots of the tools and we'll try to help.

Shimaa El-Srougy

unread,
Aug 8, 2023, 9:42:13 AM8/8/23
to Rick Viscomi, Chrome UX Report (Discussions)
Thank you so much for breaking it down. It does help clear it up a bit. But I have yet to understand the difference. 

So here is what I am trying to understand and see. We have an Origin and under that Origin we have page urls(around 794 or so). When I try to compare by doing average 75% of the total pages for LCP I get a different number than what the Origin LCP metric that is shown in pagespeed.  The Origin is like 4.2 and the average for total pages are 3.3

1. Is there a way to get the number of visits for each URL using Crux API?  Because I look at google analytics and get that for calculations which I know may not be the correct way. 

2. If I look up Domain (origin) "This URL" shows me a different number then I click on "Origin". If I look up one of the URLs under that domain I expect that "this URL" to be different because it's part of the origin. and when I click on "Origin" I see the same value. How are Origins calculated when looking at them in URL? And when we look at Curx API are they calculated the same? Is there a breakdown of how those are calculated. 

Below is an example of Origin and URL under that maybe it can help. 

PageSpeed 

Origin This URL
image.png
Origin - Origin 
image.png

URL under that Origin
image.png

URL Origin
image.png

  

Rick Viscomi

unread,
Aug 8, 2023, 5:04:59 PM8/8/23
to Shimaa El-Srougy, Chrome UX Report (Discussions)
Ok thanks for elaborating, I think I understand now.

On Tue, Aug 8, 2023 at 9:42 AM Shimaa El-Srougy <shimaa_e...@colpal.com> wrote:
Thank you so much for breaking it down. It does help clear it up a bit. But I have yet to understand the difference. 

So here is what I am trying to understand and see. We have an Origin and under that Origin we have page urls(around 794 or so). When I try to compare by doing average 75% of the total pages for LCP I get a different number than what the Origin LCP metric that is shown in pagespeed.  The Origin is like 4.2 and the average for total pages are 3.3

The origin-level LCP is calculated by taking all LCP values from all pages on the website, categorizing them as good/poor, and computing the 75th percentile.

If you're calculating that from your raw RUM data, be aware that it will be a slightly different sample than what's used by CrUX. Only a subset of Chrome users meet the CrUX eligibility criteria, so it's expected that the different distributions of LCP values will lead to different 75th percentiles.


1. Is there a way to get the number of visits for each URL using Crux API?  Because I look at google analytics and get that for calculations which I know may not be the correct way. 

We don't expose the number of visits in the CrUX API. 
 

2. If I look up Domain (origin) "This URL" shows me a different number then I click on "Origin". If I look up one of the URLs under that domain I expect that "this URL" to be different because it's part of the origin. and when I click on "Origin" I see the same value. How are Origins calculated when looking at them in URL? And when we look at Curx API are they calculated the same? Is there a breakdown of how those are calculated. 

Below is an example of Origin and URL under that maybe it can help. 

I think you might be overloading the word "origin" when referring to the root page of the site.

- https://example.com/ is the root page of the origin https://example.com (no trailing slash).
- https://example.com/example is a subpage of the origin https://example.com.

So if you look up those two pages in PageSpeed Insights, you should expect to see different page-level data ("This URL"). But the origin-level data ("Origin") should be identical.

You can learn more about how URLs and origins are represented in the CrUX API docs.


Hope that answers your questions. Let me know if you're still unsure about anything.
Reply all
Reply to author
Forward
0 new messages