Google’s New Metric: How to Optimize Your Magento Webshop for INP

Google’s New Metric: How to Optimize Your Magento Webshop for INP

In today’s competitive world of e-commerce, staying ahead means constantly adapting to new metrics and standards. One such metric generating significant interest is Interaction to Next Paint (INP). INP is set to replace First Input Delay (FID) in Google’s Core Web Vitals and will become one of the crucial factors for website ranking and user experience. Let us delve deeper into INP, why it is vital for every website—including your Magento webshop—and how you can optimize it to improve your website’s performance.

What is INP?

Interaction to Next Paint (INP) is a central component of Google’s Core Web Vitals and will become a ranking factor starting March 2024. By providing visual feedback, it measures how quickly a webpage responds to user interactions, such as clicks, taps, or keyboard inputs. This feedback could include, for example, updating the shopping cart icon, changing a product’s color, or displaying a dropdown menu. Unlike other metrics such as Largest Contentful Paint (LCP) and FID, INP focuses on interactions that occur on the page after the initial load.

INP measures the exact time the page takes to respond visually after a user interaction, such as when a user clicks a button or selects an option.

Why is INP Important for User Experience?

According to Chrome usage data, as much as 90% of the time a user spends on a webpage occurs after it has loaded. This statistic highlights the importance of ensuring not only that your webpage loads quickly, but also that it responds promptly to user interactions.

A lower INP score indicates a more responsive website, where users receive quick visual feedback demonstrating that their interaction was successful. Consider, for example, the shopping cart icon updating to indicate that the selected product has been added to the cart.

Conversely, a webpage with a high INP score can leave users wondering if their interaction, such as a click or tap, had any effect. A delay in displaying the results of their action may force the user to click the button again, unintentionally adding the item to the cart a second time. Slow INPs can be highly frustrating for your customers. They may get the impression that your site requires repair, leading to decreased trust and, consequently, fewer sales.

How is INP Measured?

INP measures the latency of a page’s response to user interactions, such as mouse clicks, touchscreen taps, or keyboard presses. In this context, latency refers to the time the page takes to display visual feedback following the user’s interaction.

For example, suppose a user clicks on a color option on your product page, causing the product to change color. The time required to display this change is measured as part of the page’s INP.

For a good INP score, the INP for a page should remain below 200 milliseconds. An INP score above 200 ms but at or below 500 ms indicates that your page’s responsiveness needs improvement. An INP exceeding 500 ms is a sign of poor responsiveness.

The INP result is a single value for a page, indicating that all or nearly all interactions fall below this value. However, if there is insufficient data for an individual page or URL on your site, the aggregated INP data for all pages of the origin domain will be displayed. For instance, if a specific product page has no INP data, the INP for your entire domain will be shown.

Because INP is measured by real Chrome users visiting your site, it is a metric that provides a reliable indication of how responsive your site truly is.

How to View Your INP

Although INP is not yet used as a ranking factor, it is already being reported. This allows you to address any INP-related issues before it becomes a ranking factor in March 2024.

There are several ways to view the INP rating of your site and its pages:

  • Google PageSpeed Insights: By entering a page’s URL into Google PageSpeed Insights, you can gain insight into your INP rating and other performance metrics.
  • Google Search Console: If you have added your site to Google Search Console, you can check your site’s INP status in the Core Web Vitals section.
  • Web Vitals Chrome Extension: By installing the Web Vitals Chrome extension, you can measure your INP by visiting a page and performing interactions.
  • Using the Chrome extension is particularly useful if there is insufficient data to obtain results from other sources or if you wish to personally test interactions on your webshop.

What Causes INP Issues?

It is crucial to understand what may be causing issues with your INP before looking at how to improve it. Several factors can contribute to poor INP ratings, including:

  • Hosting: Underpowered or low-quality hosting can significantly impact performance.
  • Themes and Design: Only optimized themes or site designs can positively influence the INP rating.
  • Extensions: Bloated or incorrectly configured extensions can slow down your site and result in poor INP scores.
  • JavaScript Overload: Excessive use of JavaScript, especially in unnecessary areas, can contribute heavily to INP issues.
  • Unused Tags: Tags that are no longer required, such as those from third-party services, can negatively affect your INP.

How to Improve Your INP

Please note that this may require contacting your development agency; if you need assistance from a trusted partner, you can contact us here. Now that we have identified potential issues that can cause a poor INP score, let us explore how to improve the INP score of your webshop:

  • Limit Input Delay: Avoid recurring timers, such as setTimeout and setInterval, which can disrupt user interactions, to limit input delay.
  • Avoid Long Tasks: Long tasks can block the main thread, preventing the browser from executing interaction events. To improve responsiveness, you can break down long commands into smaller, manageable pieces.
  • Address Interaction Overlap: Interaction overlap can occur when a user performs multiple interactions before the first interaction can render the next frame.
  • Debounce inputs and use mechanisms such as AbortController to cancel fetch requests, thereby preventing overload of the main thread.
  • Optimize Event Callbacks: Evaluate the necessity of event callbacks and defer their execution if they are not essential. Removing unnecessary callback functions can also improve your INP.
  • Defer Non-Rendering Work: Postpone tasks that are not related to user interface changes to prevent delays in rendering the next frame.

Minimize Presentation Delay

To minimize presentation delay and optimize your INP score, consider the following practices:

  • Reduce DOM Size: A large DOM can lead to poor INP scores. Aim to reduce DOM depth and keep it below 1,400 nodes. This can be achieved by avoiding poorly coded plugins and themes, minimizing JavaScript-based DOM nodes, and more.
  • Avoid Excessive Work in requestAnimationFrame Callbacks: RequestAnimationFrame callbacks can affect the rendering of the next frame. Limit the work performed in these callbacks to improve INP.
  • Defer Off-Screen Animations: Off-screen animations do not need to be executed immediately upon initial load. Defer them until they come into view, thereby limiting INP delays.
  • Optimize Image Loading: Images that are not initially visible should be lazy-loaded to prevent delays in rendering the next frame.
  • Use Efficient CSS: Complex and inefficient CSS can affect the rendering process. Optimize your CSS to reduce rendering delays.

Conclusion

Optimizing your Magento webshop for Interaction to Next Paint (INP) is essential to remain competitive in the e-commerce environment. As Google will make INP a significant ranking factor starting in March 2024, European web retailers must improve this metric to enhance their webshop’s performance, user experience, and conversion rates.

INP ensures that users receive prompt visual feedback. By optimizing your INP score, you can create a more responsive, efficient, and pleasant shopping experience for your customers, ensuring they buy now and return later for future purchases. That is the ultimate goal, is it not?

Why choose Younify?

Expertise

Magento and Hyvä specialists focused on performance and growth. From development and support to implementation, we know the Magento platform inside out and understand what is required to scale.

Dedication

Committed to your webshop, from launch to further development. We work closely together, provide proactive input, and continuously optimize for the best results.

Trusted partner

A single partner for your complete e-commerce solution. Thanks to strong partnerships and broad expertise, we deliver custom solutions including integrations, support, and optimization.

Scalability

Webshops that grow with your ambitions. We build scalable Magento and Hyvä solutions ready for growth, expansion, and further development.

 

Ready to renew and grow your Magento webshop?

Let’s work together and discover the possibilities.