docs

Core Web Vitals

Overview

Core Web Vitals shows how fast, responsive, and stable your storefront feels to real shoppers in their browsers. It measures the three metrics Google uses to rate page experience:

MetricWhat it measuresGoodNeeds improvementPoor
LCP (Largest Contentful Paint)How long it takes for the largest piece of content, such as a hero image or headline, to appear. Measures loading speed.≤ 2.5 s2.5 s to 4 s> 4 s
INP (Interaction to Next Paint)How long the page takes to visibly respond after a click, tap, or key press. Measures responsiveness.≤ 200 ms200 ms to 500 ms> 500 ms
CLS (Cumulative Layout Shift)How much the page layout jumps around while it loads. Measures visual stability.≤ 0.10.1 to 0.25> 0.25

Application Insights tells you whether your application is healthy: throughput, errors, and server response time. Core Web Vitals answers a different question: what do shoppers actually experience in the browser? Both matter. Core Web Vitals affect conversion, and Google uses them as a ranking factor in search results.

The data comes from real page views on your live storefront (real user monitoring). You don't need a third-party monitoring tool. You only add one script tag to your storefront.

Only full page loads are measured, such as when a shopper first opens or refreshes a page, not when they navigate within the storefront. See What is measured.

Core Web Vitals lives in the SCAYLE Panel under Shops ➜ [Shop] ➜ Hosting ➜ Observability ➜ Core Web Vitals.

Observability has five tabs, each with its own environment selector:

Core Web Vitals is available only for storefronts running on Storefront Hosting.

Required permissions

Permissions are handled via user roles and can be configured in Settings ➜ User Management ➜ Roles. Both permissions are listed under Insights.

  • View insights (storefront-platform__insights__read) - view the Core Web Vitals tab.
  • Edit insights configuration (storefront-platform__insights__edit) - edit page templates in the Page Template Rules drawer.

Set up

Storefront Hosting is always ready to receive Core Web Vitals data. There is no setting to switch on in the SCAYLE Panel. To start collecting data, you add the Core Web Vitals script to your storefront and deploy it. This is a one-time change that your team makes in your own codebase.

When no data has been collected yet, the Core Web Vitals tab shows a Getting Started banner. Click Setup to open the setup steps.

Core Web Vitals tab showing the Getting Started banner with a Setup button.

Until data is collected, the Getting Started banner is shown. Click Setup to see the setup steps.

Step 1: Add the script to your storefront

Add the following script tag to the <head> of every page of your storefront. You can copy it from the Getting Started dialog using the copy button.

If your storefront is served from a URL base path, add the base path in front of the script path. For example, with the base path /store, use:

Storefront Application: Storefront Application v3 includes the script out of the box, so you can skip this step. For Storefront Application v2, add the script with a Nuxt plugin:

Create the plugin app/plugins/coreWebVitals.ts:

The plugin adds the script to the <head> of every page, including error pages, which Nuxt renders without app.vue. The src starts with app.baseURL from the runtime config, so the script path includes your base path, also when you set it at runtime with NUXT_APP_BASE_URL.

fetchpriority: 'low' is optional. It keeps the script from competing with the page's own resources for bandwidth.

Getting Started dialog with two steps: add the script to the storefront, and deploy and visit the storefront.

The Getting Started dialog shows the script tag to copy and the steps to start collecting data.

Step 2: Review your page templates

Page templates group your pages, for example all product detail pages, so you can see where performance is worst. A default set is already in place for every environment.

Before you deploy, check that the patterns match your storefront's URL structure, and add templates for any other pages you want to track, such as Basket or Search. See Page templates.

Set up your page templates early. A new template or a changed pattern only applies to new data. Data collected under a pattern you change or delete is shown under Other. See Changes only apply to new data.

Step 3: Deploy and visit your storefront

Deploy your storefront as usual (see Deployment Actions), then visit it to collect the first data.

Depending on the selected timeframe and how long visitors stay on a page, it can take from a few minutes to a few hours for the first results to appear on the tab. Data collection only begins after the script is live, so there is no data from before that point.

Deploy to every environment you want to measure. Data is collected and shown per environment. The script only runs in environments where you have deployed the code that includes it.

Keeping the script up to date

The script is served by SCAYLE from your own domain and updated automatically. You don't need to change the tag when SCAYLE releases a new version.

What is measured

Core Web Vitals measures the first page a shopper loads: the page they land on, or a page they reload. All three metrics, including INP, are measured for that first page only.

When a shopper clicks through your storefront without a full page reload (client-side navigation), the pages they reach are not measured. This means pages that shoppers usually reach by clicking through, such as Basket or Search, have less data than pages that shoppers often land on directly. They only appear in the breakdown once you add them as custom page templates.

Privacy

The script is designed to collect as little as possible:

  • It sends only the three metric values, the page path, and the navigation type.
  • It sets no cookies, uses no browser storage, and sends no user or session identifiers.
  • Device type, browser, and country are worked out on the SCAYLE side and are not sent by the script.

Content Security Policy

The script and the data it sends both stay on your own domain. It works with a strict Content Security Policy such as script-src 'self' and connect-src 'self'. You don't need to allow any third-party domains.

Controls

Timeframe and environment

Two selectors in the top right apply to everything on the tab:

  • Timeframe selector: choose Last hour, Last 24 hours, Last 3 days, Last 7 days, or Last 30 days.
  • Environment selector (next to the timeframe selector): switch between environments. To create or manage environments, see Environments.

Filters

A filter bar at the top of the tab narrows the data on everything below it, so the figures stay consistent while you narrow down a problem:

  • Device: All devices, Mobile, Desktop, or Tablet.
  • Page Template: one of your page templates, or Other. See Page templates.
  • Country: the visitor's country.
  • Browser: the visitor's browser.

On the right side of the filter bar, Manage page templates opens the Page Template Rules drawer. See Edit page templates.

Core Web Vitals tab with the device buttons and the Page Template, Country, and Browser filters, the Passing Core Web Vitals banner, the LCP, INP, and CLS cards with LCP selected, and the Largest Contentful Paint over time chart.

The Core Web Vitals tab with the filter bar, the assessment banner, and the metric cards.

Cards

Assessment banner

Below the filters, a banner shows whether the environment passes the Core Web Vitals assessment for the selected timeframe and filters, for example Passing Core Web Vitals: 3 of 3 core metrics meet the Good threshold for the selected filters. It also shows the current 75th percentile value for each metric, for example LCP 1.19s, INP 19ms, and CLS 0.044.

The assessment works like this:

  1. For each metric, the Panel takes the 75th percentile (p75) of all page views in the selected timeframe and filters.
  2. Each p75 value is rated Good, Needs improvement, or Poor using Google's thresholds (see the table above).
  3. The environment passes only if every metric with data is rated Good.
  4. The banner takes the color of the worst rating.

A metric without data is left out of the assessment. For example, INP has no value until shoppers have clicked, tapped, or pressed a key.

Metric cards

One card for each metric: LCP, INP, and CLS. Each card shows:

  • 75th percentile (p75): the value that 75% of page views reach or beat. This is the value Google uses to rate a page.
  • Change since the previous period: next to the p75 value, an arrow shows how the value changed compared with the previous period of the same length. For example, with Last 7 days selected, the cards compare against the 7 days before that. Green means the metric got better (lower), red means it got worse (higher). LCP and INP show the change as a percentage, for example ↗ 19%. CLS has no unit, so it shows the change as a value, for example ↗ 0.044. Very small changes are not shown.
  • Rating distribution: the share of page views in the selected timeframe and filters rated Good, Needs improvement, and Poor.

The change since the previous period is not available for Last 30 days.

Click a metric card to select it. The chart below switches to that metric.

Over time

The chart shows how the p75 value of the selected metric develops over the timeframe, for example Largest Contentful Paint over time when LCP is selected. The legend at the bottom shows the Good, Needs improvement, and Poor thresholds for that metric.

The chart also shows:

  • Threshold lines: dashed lines mark the Good and Poor thresholds, so you can see at a glance which rating a value falls into.
  • Deployment markers: vertical lines labelled with the deployed commit (for example 1d1c46f). Use them to connect changes in performance with releases. For example, a jump in LCP right after a marker points to a change in that deployment.
  • Shaded area: a striped area at the start of the chart marks the part of the timeframe that has no data.
Interaction to Next Paint over time chart with the INP card selected, dashed threshold lines, a deployment marker labelled with a commit, and a legend with the Good, Needs Improvement, and Poor thresholds.

Select a metric card to see that metric over time, with threshold lines and deployment markers.

Breakdown

The Breakdown table compares groups side by side so you can find where performance is worst, for example "which page template has the slowest LCP".

  • Group by: Page Template, Country, or Browser.
  • Sort: sort the groups by Page Views, LCP (p75), INP (p75), or CLS (p75), each in descending or ascending order. The default is Page Views, descending, so your busiest groups are at the top. To find your slowest pages first, sort by LCP (p75), descending.

Each row shows:

ColumnWhat it shows
Page ViewsThe number of page views in this group.
LCP (p75)The 75th percentile LCP for this group.
INP (p75)The 75th percentile INP for this group.
CLS (p75)The 75th percentile CLS for this group.
AssessmentWhether this group passes (Good) or not (Needs improvement or Poor), using the same rules as the assessment banner.

When grouped by Page Template, each row also shows the template's pattern under its name, and Other shows Pages that match no template. This helps you check that your patterns match the pages you expect.

A dash (-) means there is no data for that metric in the group, for example when no shopper interacted with the page. Metrics without data are left out of the assessment, so a group can still be rated Good.

Breakdown table with Group by and Sort controls, showing page views, LCP, INP, and CLS at the 75th percentile, and an assessment for each group.

Group and sort the breakdown to find where performance is worst.

Figures based on few page views

Percentiles based on only a few page views can be misleading. The Panel does not currently warn you when a figure is based on few page views. Be careful when reading figures for a new environment, a short timeframe such as Last hour, or a narrow combination of filters. Check the Page Views column in the breakdown to see how much data a figure is based on.

For example, a Checkout template with only 2 page views can be rated Poor because one slow or unstable page load is enough to push its p75 over the threshold. With more traffic, the same page may well be rated Good.

No data

When there are no page views in the selected timeframe, the tab shows No data available. This is not an error. Check that the script is added to your storefront and deployed. If you just added it, recent traffic can take a while to show up, especially in longer timeframes.

The INP chart can also show No interactions recorded in the selected time range. INP is only measured when shoppers click, tap, or press a key, so pages that are viewed without any interaction have no INP value.

Page templates

Page templates group your pages so you can compare similar pages, for example all product detail pages together. You can filter by page template and group the breakdown table by it.

How matching works

  • Each page template has a name and one URL pattern.
  • Page templates are set per environment. Changing them in one environment does not affect your other environments.
  • Patterns are regular expressions in RE2 syntax. They are matched against the URL path only, without the domain or query string. For example, for https://shop.example.com/p/blue-shirt-123?color=blue, the pattern is matched against /p/blue-shirt-123.
  • Page templates are checked from top to bottom. The first one that matches decides which template a page belongs to. Put more specific templates above more general ones.
  • Any page that matches no template is grouped as Other. Other always exists and cannot be edited.

Default page templates

Every environment starts with five default page templates that match the standard Storefront Application URL structure. The defaults are the same for Storefront Application v2 and v3.

Page templateDefault pattern
Homepage^(?:/[a-z]{2}(?:-[a-z]{2})?)?(?:/homepage)?/?$
Product Listing Page/c/.+-\d+$
Product Detail Page/p/[^/]+-\d+$
Content/content/.+$
Checkout/checkout$

Below these, Other is shown as the fallback for unmatched pages.

Edit page templates

Editing page templates requires the Edit insights configuration (storefront-platform__insights__edit) permission.

  1. On the Core Web Vitals tab, click Manage page templates (on the right side of the filter bar). The Page Template Rules drawer opens.
  2. Make your changes:
    • Change a pattern: edit the pattern in the field below the template name.
    • Reorder templates: drag a template up or down using the handle to the left of its name.
    • Delete a template: click the trash icon next to the template.
    • Add a template: click Add page template, then enter a name and a pattern.
  3. Click Save Rules. Click Cancel to discard your changes.

Pattern limit. Each environment supports up to 10 patterns. Because each page template has one pattern, this means up to 10 page templates per environment, plus Other. The drawer shows how many you have used, for example 5 of 10 patterns used.

Page Template Rules drawer listing page templates with their patterns, a drag handle and trash icon for each, the Add page template button, the pattern counter, and the Other fallback.

The Page Template Rules drawer. Templates are checked from top to bottom, and the first match wins.

Changes only apply to new data

When you save changes to your page templates, new data is grouped using your new page templates. What happens to data collected before the change depends on what you changed:

  • Add a template: older data stays where it was. For example, if you add a Search template today, searches from earlier in the selected timeframe still appear under Other. Only searches from now on appear under Search. Your other templates, such as Homepage, keep their history.
  • Change a pattern or delete a template: data collected with the old pattern is shown under Other.
  • Rename a template: its history moves with it and is shown under the new name.

To keep your history consistent, set up your page templates before you add the script, or as early as possible, and avoid frequent pattern changes. No redeployment is needed for template changes.

How the data is collected

  1. The script runs in the shopper's browser and measures LCP, INP, and CLS.
  2. When the shopper leaves or hides the page, the script sends one small report for that page view to your own domain.
  3. Storefront Hosting checks the report and adds the device type, browser, country, page template, and time of receipt. The report never reaches your Storefront Application.
  4. The data is stored and shown on the Core Web Vitals tab.

Retention

You can view data for up to the last 30 days, matching the longest option in the timeframe selector.

Limits

LimitValue
Page template patterns per environment10