Blog

Lightweight analytics scripts compared, under 5 KB

The privacy-first analytics trackers are all small, under 5 KB. Here is why that matters, and how they compare.

Published August 2026

Why analytics script size matters

Every analytics script the browser downloads and parses adds to your page load time. If the script is render-blocking, it delays First Contentful Paint. Page speed is a Google ranking signal, and a slow analytics script drags down your Core Web Vitals (LCP, CLS, INP).

This is where privacy-first tools have a structural advantage. Because they do less (no cookie management, no cross-device linking, no ad-platform integration), their scripts are tiny. A smaller script means a faster site.

Rule of thumb. The privacy-first trackers in this comparison are all under 5 KB. Google Analytics 4’s gtag.js is around 50 KB or more, an order of magnitude larger.

Lightweight analytics scripts, compared

ToolApprox. script sizeCookieless
PlausibleUnder 1 KBYes
FathomUnder 2 KBYes
MetriXs~4 KB (full); lite is smallerYes
Google Analytics 4~50 KB+ (gtag.js)No

Sizes are approximate and as published by each tool. MetriXs’ tracker is built with Rollup and served versioned with a long cache.

Why privacy-first scripts are smaller

A cookie-based analytics script is large because it carries the machinery of surveillance: cookie persistence, cross-device linking, consent-mode logic, ad integrations, and demographic modelling.

A cookieless tracker only needs to do one thing: send a pageview or event with a few properties to a collection endpoint. Smaller script, faster site, better rankings, better user experience.

What MetriXs ships

MetriXs builds two trackers with Rollup:

  • tracker.js (full), around 4 KB. Pageviews, custom events, and auto-tracking for outbound links, file downloads, and 404 pages.
  • tracker.lite.js, pageviews only, smaller still. Use it when you want the absolute minimum and do not need auto-tracking.

Both are served versioned (?v=1.1.0) with a one-year immutable cache, so a new version reaches every browser instantly on the next load.

The performance trade-off

A cookie-based tool gives you individual user tracking in exchange for a heavier script, a cookie banner, and losing visitors who reject it. A lightweight, cookieless tool gives you a faster site, no banner, and every visitor measured. For most sites, the second trade is the better one.

If you care about Core Web Vitals and want analytics that does not slow your site down, try MetriXs. The full tracker is around 4 KB and sets no cookies.

Frequently asked questions

How big should an analytics script be?
Small. The privacy-first trackers in this comparison are all under 5 KB. Plausible is under 1 KB, Fathom under 2 KB, and MetriXs around 4 KB. GA4’s gtag.js is ~50 KB+.
Does a smaller analytics script make my site faster?
Yes. Every kilobyte downloaded and parsed adds to load time. A smaller script improves First Contentful Paint and Core Web Vitals.
Why are privacy-friendly analytics scripts smaller?
Because they do less. Cookie-based trackers carry code for identifier persistence, ad networks, and demographic modelling. Cookieless trackers only send lightweight events.
Does MetriXs offer a lighter script?
Yes. MetriXs ships tracker.js (~4 KB, with auto-tracking) and tracker.lite.js (pageviews only, even smaller).

A faster, lighter tracker

MetriXs’ tracker is around 4 KB, cookieless, and GDPR compliant. Free plan, paid from €6/month.

Start free trial →

Related: MetriXs vs Plausible · MetriXs vs Fathom · Cookieless web analytics · Google Analytics alternative