Skip to content
Comparison

Cloudflare Analytics vs Google Analytics — Which Is Better?

Cookie banners that annoy your visitors, inaccurate data because of ad blockers, and a script that slows down your site. Here's why I removed Google Analytics from all my projects and switched to Cloudflare.

42%
of users block GA
100%
Cloudflare accuracy
~45 KB
GA script size
0 KB
Cloudflare client-side

How Cloudflare Analytics Works

Cloudflare Analytics works in a fundamentally different way from traditional visitor tracking tools. Instead of injecting JavaScript into the visitor's browser, Cloudflare counts requests at the CDN level -- on the server side -- before the page even reaches the user's browser.

What does that mean in practice? There's no script to load. No cookies being set. No data traveling to third-party servers. Every visit is recorded directly on Cloudflare's infrastructure, which your traffic already passes through.

The data you get is clean and straightforward: visitor count, page views, geographic location, device and browser type, traffic sources, and HTTP status codes. For most business presentation websites, that's everything you need to make informed decisions.

How Google Analytics 4 Works

Google Analytics 4 (GA4) takes a client-side approach. You embed a JavaScript snippet (gtag.js) on every page, which tracks what the user does -- which pages they visit, how long they stay, where they click, how far they scroll. All of that data gets sent to Google's servers, where it's processed and displayed in a dashboard.

This approach yields extremely detailed data. GA4 can track specific user interactions, conversions, e-commerce transactions, and user behavior through an entire funnel from first visit to purchase. The problem is the price of all that detailed tracking: slower pages, the need for cookies, GDPR complications, and vulnerability to ad blockers.

Fun fact: The Google Analytics script (gtag.js) adds about 45 KB to your page and requires 2-4 additional HTTP requests to Google's servers. On an average mobile connection, that translates to 200-400 milliseconds of extra load time.

Privacy and GDPR Compliance

This is where the difference between the two systems becomes stark.

Google Analytics and cookie banners

GA4 uses cookies to track users across sessions and return visits. Under the European General Data Protection Regulation (GDPR) and the ePrivacy Directive, you must obtain explicit user consent before setting such cookies. That means you need a cookie banner.

The reality of cookie banners is bleak. Most visitors either immediately click "Reject" or simply leave the site when they see the popup. Research shows that only 20-30% of users actively accept cookies on consent banners. That means for 70-80% of your visitors, you have zero data because you're legally required to respect their choice.

This creates a paradox: the tool that's supposed to give you insight into visitor behavior actually only works for a minority of them.

Cloudflare without cookies

Cloudflare Analytics doesn't use cookies at all. It doesn't collect personal data. It doesn't identify individual users. All it does is count anonymous requests at the CDN level.

The result? You don't need a cookie banner. You don't need user consent. You don't need a cookie policy. Your site is automatically GDPR-compliant when it comes to analytics. Visitors get a clean experience without popups, and you get complete data on all visitors -- not just the ones who clicked "Accept."

GDPR in practice: Austria, France, and Italy have already issued rulings that using Google Analytics without adequate consent violates GDPR. Cloudflare Analytics has never been the subject of such regulatory action because it simply doesn't collect personal data.

Data Accuracy and Ad Blockers

This might be the most important practical argument. Google Analytics has a systemic problem that many website owners don't realize.

According to research, between 25% and 42% of internet users use some form of ad blocker. Virtually all ad blockers on the market automatically block the Google Analytics script because it loads from well-known Google domains that appear on every blocklist.

What does that mean for your data? If GA4 says you have 1,000 visitors per month, the actual number is probably closer to 1,400-1,700. A third to nearly half of your visitors are completely invisible.

Cloudflare Analytics counts visits at the CDN level, before the request even reaches the user's browser. Ad blockers can't block something that doesn't execute in the browser. Cloudflare captures every single request, so the numbers are close to 100% of actual traffic.

Fun fact: Among technical users (developers, IT professionals), ad blocker usage exceeds 60%. If your website targets a technical audience, Google Analytics is literally showing you less than half of your actual visitors.

Impact on Page Speed

Every kilobyte of JavaScript on a page has a measurable impact on load time, and by extension on user experience and SEO rankings. Google itself states that page speed is a ranking factor in search results.

What Google Analytics adds to your page

  • Core gtag.js script -- about 45 KB of compressed JavaScript
  • Additional tracking modules -- 15-30 KB depending on configuration
  • HTTP requests -- at least 2-4 extra requests to google-analytics.com and googletagmanager.com
  • JavaScript execution -- parsing and running the script consumes CPU time, especially on lower-end mobile devices

In practice, Google Analytics adds 200-400 milliseconds to total page load time. On mobile networks with higher latency, that number can be even greater. It's a difference users can feel, and Google PageSpeed definitely measures it.

Cloudflare: zero client-side impact

Cloudflare Analytics doesn't add a single byte of code to your page. There's no script to load, no HTTP requests to make, no JavaScript to execute. Your page loads just as fast as if no analytics system existed at all. For a website that prioritizes speed and accessibility, that's a significant advantage.

Why speed matters: Google uses Core Web Vitals as a ranking factor. Visitors abandon pages that take more than 3 seconds to load. Every millisecond has a measurable impact on conversions. Removing unnecessary scripts is one of the easiest ways to improve performance, and the analytics script is often the first candidate for removal.

Want a Fast Website Without Unnecessary Scripts?

Every website I build uses Cloudflare for speed, security, and analytics. No cookie banners. No slowdowns.

Server-Side vs Client-Side Tracking

The fundamental technical difference between these two systems is where the tracking happens.

Client-side (Google Analytics): The script runs in the user's browser. That means it depends on JavaScript loading and executing successfully. It can be blocked by ad blockers, it can fail if the user has a slow connection, and it can be disabled if the user manually turns off JavaScript.

Server-side (Cloudflare): Tracking happens at the infrastructure level through which traffic already flows. It doesn't depend on the user's browser, ad blockers, or JavaScript support. Every HTTP request is recorded, without exception.

The server-side approach has one limitation: it can't track user interactions within the page (button clicks, scrolling, form submissions). You'd need a client-side script for that. But the real question is: do you actually need that data?

Simplicity vs Complexity

Google Analytics 4 has hundreds of reports, dozens of metrics, and requires serious learning to use properly. Event tracking, custom dimensions, data streams, audiences, explorations -- for someone who runs a small business and just wants to know whether people are visiting their site, it's absolutely overkill.

Cloudflare Analytics shows you what you actually need: how many people are visiting, which pages they're viewing, which countries they're from, what device and browser they're using, and where they came from (Google, direct, another site). You open the dashboard, check the numbers, and close it. No analytics course required.

Real-time data

Cloudflare displays data in near real-time with minimal delay. GA4 also has real-time reports, but more detailed data arrives with a 24-48 hour lag because Google processes data in batches.

When Google Analytics Is Still the Better Choice

I'm not claiming Cloudflare Analytics is always better. There are legitimate cases where GA4 has advantages that Cloudflare can't match.

E-commerce with detailed conversion tracking

If you run an online store and need to know exactly which products are added to cart, at which step customers abandon the purchase, what the average order value is, and which marketing channel brings the most profitable customers -- GA4 is superior. Cloudflare doesn't track user interactions at that level.

Complex marketing funnels

If you have a multi-stage sales process with multiple touchpoints (first visit from an ad, return via email, purchase on the third visit), GA4 can map the entire user journey. This is useful for businesses spending thousands of euros per month on digital marketing.

A/B testing

If you actively test different page variations (e.g., two different headlines or layouts) and need to measure which version converts better, GA4 integrates with Google Optimize tools for that. Cloudflare Analytics doesn't have this capability.

But for a small business presentation website? For freelancers, local businesses, restaurants, accounting firms? GA4 is overkill. Cloudflare gives you everything you need, with zero compromises on privacy and speed.

Side-by-Side Comparison: Cloudflare vs Google Analytics 4

CriterionGoogle Analytics 4Cloudflare Analytics
Cookie banner requiredYes (GDPR)No
GDPR complianceComplicatedAutomatic
Accuracy (ad blockers)58-75%~100%
Impact on speed200-400 ms0 ms
Script size45-75 KB0 KB
Tracking methodClient-side (JS)Server-side (CDN)
Real-time dataYesYes
Conversion trackingDetailedNo
E-commerce trackingYesNo
A/B testingYesNo
SetupModerateAutomatic
PriceFree (you pay with data)Free
Dashboard complexity200+ reportsSimple

Why WebDesignbyTomi Uses Cloudflare Analytics

On every website I build, I use Cloudflare as the CDN and DNS provider. That automatically means Cloudflare Analytics is included without any extra configuration or code.

The reasons are clear and practical:

  • Your visitors' privacy -- no cookies, no tracking, no cookie banners driving people away
  • Maximum speed -- pages load without a single unnecessary script, which directly affects SEO rankings
  • Accurate data -- you see 100% of visitors, not just those without ad blockers
  • Automatic GDPR compliance -- no worrying about legal cookie requirements
  • Zero additional cost -- included free with the Cloudflare CDN I already use for performance and security
  • Simplicity -- clients can view their stats without any prior analytics knowledge

For clients who need visitor analytics, it comes with the Standard and Premium packages. Setup is automatic because Cloudflare is already protecting and accelerating the site.

Fun fact: Google Analytics is free because Google uses your visitor data to improve its advertising products. You don't pay with money, but you pay with your users' data. Cloudflare Analytics doesn't use your data for anything other than showing you the stats.

How to Switch from Google Analytics to Cloudflare

If you're already using Google Analytics and thinking about switching, the process is straightforward.

1. Set up Cloudflare

If your domain already uses Cloudflare for DNS (which is free), analytics is automatically enabled. If you don't use Cloudflare yet, migrating DNS takes 10-15 minutes and requires no changes to your site.

2. Remove the Google Analytics script

Find and delete gtag.js and all related scripts from your site's code. It's usually one or two blocks of JavaScript code in the page header.

3. Remove the cookie banner

If you had a cookie banner solely because of Google Analytics, you can remove it. Without tracking cookies, there's no need for consent.

4. Test your speed

Run a Google PageSpeed Insights test before and after removing the GA script. You'll notice an improvement in performance, especially on mobile devices.

Tip: Before removing Google Analytics, export your historical data if it's important to you. Once you remove the script, Google stops collecting new data, but your old data remains accessible in the GA4 dashboard.

Frequently Asked Questions

For most small business owners and presentation websites, absolutely yes. Cloudflare Analytics shows how many visitors you have, which pages they view, which countries they come from, and what devices they use. That's everything most small businesses need to make informed decisions.
No. Cloudflare Analytics doesn't use cookies or collect any personal data from visitors. Under GDPR, you don't need user consent, and therefore no cookie banner. Your site is automatically compliant with European privacy laws.
The Google Analytics script adds about 45 KB to your page and requires additional HTTP requests to Google's servers. In practice, that means 200-400 milliseconds of extra load time. On mobile devices, the impact can be even greater.
Research shows that 25-42% of internet users use ad blockers that block Google Analytics. This means GA4 potentially records only 58-75% of your actual visitors. Cloudflare Analytics counts visits at the server level, so its accuracy is close to 100%.
Technically yes, but it defeats the main advantages of the Cloudflare approach. If you add Google Analytics, you still need a cookie banner, you still slow down the page, and you still lose data from users with ad blockers. The only reason to use both is a transition period while switching from one to the other.
Yes. Cloudflare Analytics is built into every Cloudflare plan, including the free tier. If you already use Cloudflare for CDN and DNS (which is also free), analytics is automatically available with no extra setup.

Need a Website With Cloudflare Analytics?

Every website I build uses Cloudflare for speed, security, and privacy. No cookie banners, no slowdowns, no compromises.