# Using Cloudflare Web Analytics For Core Web Vitals

> Over the past year, Cloudflare Web Analytics has improved dramatically. We can now use it as a basic replacement for Google Analytics.

- Author: [Bhagwad Park](https://www.namehero.com/blog/author/bhagwad-park/)
- Published: 2021-11-03
- Updated: 2021-11-03
- Category: [Website Performance](https://www.namehero.com/blog/category/website-performance/)
- Web page: https://www.namehero.com/blog/using-cloudflare-web-analytics-for-core-web-vitals/

I’ve recently had a chance to fire up Cloudflare’s analytics once again. Almost exactly a year ago, I’d written about the now rebundled [Browser Insights](https://www.namehero.com/blog/why-cloudflare-browser-insights-isnt-ready-just-yet/) that Cloudflare deprecated. They’ve since consolidated their analytics into a new product – Web Analytics. And while it’s much better than the older Browser Insights, it’s not ready to replace Google Analytics yet. But there’s one thing it does better – and that is insights into your Core Web Vitals (CWV).

Here’s how Cloudflare’s Web Analytics can help you improve your CWV, with screenshots of how it shows up for my site WP-Tweaks.

##  Accessing Cloudflare’s Web Analytics

To access the new Web Analytics functionality in Cloudflare, log into your dashboard, click the top-left dropdown box, and select Web Analytics way down at the bottom as shown here:
 [![Cloudflare Web Analytics](https://blogcdn.namehero.com/startup/wp-content/uploads/2021/11/03110847/Accessing-Web-Analytics-in-Cloudflare-1024x744.png)](https://blogcdn.namehero.com/startup/wp-content/uploads/2021/11/03110847/Accessing-Web-Analytics-in-Cloudflare.png)Cloudflare Web Analytics

The positioning of this means that Cloudflare intends for this to be an entirely different product, separate from the regular site tools. One implication of this is that they’re opening it up to non-paying customers as well. Though if you’re a Pro user, you get some additional benefits as shown below.

## Web Analytics is Different from Browser Insights

The now-defunct Browser Insights had several issues that prevented it from being used as a web analytics product. The biggest difference now is that Web Analytics shows you an accurate count of your page views! Previously, Browser Insights would just “sample” a collection of your pages. This means if you had just 2 or 3 visits to a page, it would simply show up as “10”.

This alone makes Web Analytics a more powerful tool than before. While it doesn’t (yet) have many things that make Google Analytics interesting like events and goal conversion, it’s pretty decent as a basic and free analytics service.

## Measuring Core Web Vitals

While I wouldn’t use Web Analytics for pageviews and event tracking, there’s one area where it blows Google Analytics out of the water – and that’s tracking CWV stats. Here’s a screenshot of how the stats show up on WP-Tweaks:
 [![CWV View in Web Analytics](https://blogcdn.namehero.com/startup/wp-content/uploads/2021/11/03110841/Core-Web-Vitals-in-Cloudflare-Web-Analytics-1024x723.png)](https://blogcdn.namehero.com/startup/wp-content/uploads/2021/11/03110841/Core-Web-Vitals-in-Cloudflare-Web-Analytics.png)CWV View in Web Analytics

When you expand this page and scroll down, each CWV measurement is shown along with the list of pages that contribute most when it’s yellow or red. It also gives you amazing debugging info about which elements are causing issues. For example, these are the elements on my site that contributed towards high CLS metrics for individual pages:
 [![Individual Debugging information for CWV Metrics](https://blogcdn.namehero.com/startup/wp-content/uploads/2021/11/03110838/Identify-Problematic-CLS-Elements-1024x682.png)](https://blogcdn.namehero.com/startup/wp-content/uploads/2021/11/03110838/Identify-Problematic-CLS-Elements.png)Individual Debugging information for CWV Metrics

This information is super useful and is directly collected from visitors’ browsing experiences. So it’s better than automated tools like PageSpeed Insights and Google’s Lighthouse.

## Enabling Web Analytics

You can set it up by adding a site in the Web Analytics dashboard. If you’re a paying Cloudflare customer, you can enable it automatically. If you’re on the free tier, you have to insert a piece of code before the ending <body> tag on your page like this:
 [![](https://blogcdn.namehero.com/startup/wp-content/uploads/2021/11/03110833/Set-up-Web-Analytics-on-Cloudflare-1024x669.png)](https://blogcdn.namehero.com/startup/wp-content/uploads/2021/11/03110833/Set-up-Web-Analytics-on-Cloudflare.png)How to Install Cloudflare Web Analytics

Unfortunately, I have a “Pro” account for just one site and not the others. So I can only make use of the automatic installation on that one.

## Can Web Analytics Replace Google Analytics?

For basic pageviews, yes. Web Analytics is good enough to replace GA. The interface is also much easier to navigate, and filtering views is far smoother. Also, even though there’s no mobile app for Cloudflare Web Analytics, the mobile browser experience is pretty good in itself.

Unfortunately, Google Analytics is still a lot more powerful. For me, the ability to track events and goal conversions is key. For others, it’ll be something else. GA has a long history and it’s been covering long-tail features for a long time. But Web Analytics is improving constantly. Just in the past year, it’s gone from being almost useless for Analytics, to being a pretty decent basic replacement. Who knows where it’ll be in another year from now!

## Related posts

- [WordPress Should Do More For Core Web Vitals](https://www.namehero.com/blog/wordpress-should-do-more-for-core-web-vitals/)
- [Google Title Rewrites Impact On Core Web Vitals (CWV)](https://www.namehero.com/blog/google-title-rewrites-impact-on-core-web-vitals-cwv/)
- [4 Caching Strategies That Will Speed Up Your Website](https://www.namehero.com/blog/4-caching-strategies-that-will-speed-up-your-website/)
