I replaced Google Analytics with a 2 KB script — here's why

Published: (March 6, 2026 at 09:58 PM EST)
2 min read
Source: Dev.to

Source: Dev.to

The problem with GA4

  • GA4’s script is about 45 KB, which is heavier than most hero images after optimization. It blocks rendering and hurts Core Web Vitals.
  • Cookies everywhere — GA4 sets cookies, which means you legally need a consent banner in the EU, UK, Brazil, and increasingly in US states.
  • Your data feeds Google’s ad machine — Google uses Analytics data to improve its advertising products.
  • The interface is a lot — GA4’s learning curve is steep. Most people just want to know: how many visitors, where they’re from, and what pages they view.

What I built instead

Web Analyzer App is a privacy‑first analytics tool. Here’s what makes it different:

The setup is one line

That’s it. No npm packages, no build steps, no Google Tag Manager containers, no consent‑mode configuration.

What you get

The dashboard provides everything most sites actually need:

  • Real‑time visitors — who’s on your site right now
  • Pages, sources, countries — where traffic comes from
  • Session replays — visitor journey timelines (not screen recordings, just the page flow)
  • Goals & funnels — track conversions without writing code
  • Uptime monitoring — get alerted when your site goes down
  • SEO audits — find and fix issues automatically
  • Custom events — track button clicks, form submissions, sign‑ups
// Track a custom event — it’s this simple
window.wa('signup_completed', { plan: 'pro' });

How privacy works without cookies

Instead of cookies, we use a hash of the visitor’s IP + User‑Agent + a daily rotating salt. This gives unique visitor counts without ever storing personal data. The hash can’t be reversed and resets every 24 hours.

No cookies = no consent banner needed. You’re GDPR, CCPA, and PECR compliant out of the box.

Performance comparison

I tested both scripts on a clean page using WebPageTest:

  • GA4: 45 KB transferred, 3 network requests, 12 ms main‑thread blocking
  • Web Analyzer App: 2 KB transferred, 1 request

Add the script, wait 30 seconds, and check your dashboard. If you don’t see data within a minute, something’s wrong — reach out at and I’ll help you debug it.

If you have questions about privacy‑first analytics, GDPR compliance, or migrating from GA4, drop a comment. Happy to help.

0 views
Back to Blog

Related posts

Read more »