The core web vitals form a set of metrics that directly measures the impact your website's loading speed, interactivity, and visual stability have on the user experience, engagement, and search engine rankings.
There are three core web vitals:
- Largest Content Paint (LCP): measures loading performance.
- First Input Delay (FID): measures interactivity.
- Cumulative Layout Shift (CLS): measures visual stability (highly impacted).
LCP measures the loading speed of the largest element on a webpage. It is important because it directly impacts perceived page speed and user engagement.
Google recommends an LCP of less than 2.5 seconds for a good user experience.
Out of the box, the Taplytics SDK optimizes for LCP performance by:
- Providing the JS SDK as a web application bundle or via a content delivery network (CDN), which is used to improve loading performance, reliability, and resilience against cyber attacks.
- Loads asynchronously with a built-in method that will allow for the SDK to load synchronously and prevent content flickering.
LCP can be further optimized:
- Optimize critical CSS to prioritize rendering of above-the-fold content.
- Avoid using large, slow-loading fonts.
- Reduce the size of the SDK and network requests by loading only the necessary experiments.
FID measures the time between a user's first interaction with a webpage and the response of the page. It is important because it directly impacts perceived interactivity and user engagement.
Google recommends an FID of less than 100 milliseconds for a good user experience.
To improve the FID of your website, try:
- Reducing the amount of Javscript executed during page load by removing unnecessary or redundant code.
- Removing any unused JS from your project once you are done with it.
CLS measures the amount of unexpected layout shifts on a webpage. As such, CLS plays a vital role when dealing with visual edits that directly impact perceived visual stability and user engagement.
Google recommends a CLS score of less than 0.1 for a good user experience.
To improve the CLS of your website, try:
- Design experiments on elements below the fold. These are elements that are not initially visible that need to be scrolled into view.
- Use CSS over JS to apply a specific treatment if possible, as CSS is generally faster than JS.
- Set dimensions for all content that needs to be loaded, such as images, ads, embeds, and videos.
- Load web fonts with fallback options to avoid layout shifts caused by font loading.
- Implement responsive design into experiments to ensure that elements on the page remain stable when viewed on different screen sizes.
- Replace elements in variations of similar size to minimize layout shifts.
Core Web Vitals are crucial for ensuring a fast and responsive experience for your users on your website or application. When using any integration, such as the Taplytics JS SDK, it's important to consider the impact it will have on the core web vitals.
By implementing the optimization techniques discussed, we can improve the core web vitals of your website or application to provide a better experience for your users.
Updated 10 months ago