Analytics JavaScript size across 17 trackers, gzip and brotli measured
The analytics JavaScript your visitors download ranges from 326 bytes to about 121 KB, a 380× spread, and every byte is measured below. On 23 September 2026 we downloaded the tracking script of 17 analytics tools and compressed each one the way a web server sends it, with gzip and with brotli, which most browsers now prefer. Every visitor pays for it on every page load, yet vendors rarely publish it plainly.
How big is each analytics script?
Sorted by brotli transfer size, the bytes a modern browser downloads, measured 23 September 2026 (Simplytics: 17 November 2026; Umami: 14 November 2026).
| Tool (script) | gzip | brotli | vs Simplytics (brotli) |
|---|---|---|---|
Counter.dev (script.js) |
438 B | 326 B | 0.3× |
Litlyx (litlyx.js) |
1,199 B | 995 B | 0.9× |
Simplytics (track.js) ¶ |
1,264 B | 1,074 B | 1× |
Plausible, base (script.js) |
1,286 B | 1,122 B | 1.0× |
Fathom (script.js) |
2,087 B | 1,793 B | 1.7× |
Vercel Web Analytics (script.js) |
2,019 B | 1,829 B | 1.7× |
| Plausible, with outbound links + downloads + events | 2,079 B | 1,838 B | 1.7× |
GoatCounter (count.js) |
3,317 B | 2,795 B | 2.6× |
Pirsch (pa.js) |
3,507 B | 3,050 B | 2.8× |
Simple Analytics (latest.js) |
3,827 B | 3,407 B | 3.2× |
Umami (script.js) § |
4,134 B | 3,750 B | 3.5× |
Swetrix (swetrix.js) |
6,236 B | 5,474 B | 5.1× |
Cloudflare Web Analytics (beacon.min.js) |
10,133 B | 9,176 B | 8.5× |
Rybbit (script.js) |
10,872 B | 9,746 B | 9.1× |
StatCounter (counter.js) |
17,534 B | 15,666 B | 15× |
Matomo (public demo matomo.js) † |
65,508 B | 56,090 B | 52× |
PostHog (array.js) ‡ |
98,375 B | 82,982 B | 77× |
Google Analytics 4 (gtag.js) |
150,363 B | 124,252 B | 116× |
¶ Re-measured 17 November 2026. It was 1,273 B gzip and 1,083 B brotli on 12 November, 1,228 B and 1,056 B on 5 November, and 1,889 B and 1,599 B on 23 September.
§ Re-measured 14 November 2026, after Umami's script grew. It was 2,333 B gzip and 2,054 B brotli on 23 September.
† From Matomo's public demo, which loads plugins a plain install would not. A default self-hosted Matomo is smaller; a commonly cited forum figure is about 20 KB, which we did not measure. Treat this row as an upper bound.
‡ PostHog's array.js also loads autocapture and session-replay code, so it does far more than count pageviews. The reverse holds for the small scripts: they do less.
The privacy-first, cookie-less tools sit between about 0.3 KB and 5.5 KB brotli. The real gap is with the general-purpose suites: Google Analytics 4 ships about 116 times more compressed JavaScript than Simplytics, and PostHog about 77 times more, before any tag manager or consent banner.
Why measure brotli, not just gzip?
Because brotli is what your visitors mostly receive: every current version of Chrome, Firefox, Safari and Edge supports it, and a CDN serves it over gzip when the browser's Accept-Encoding header allows. It is typically a few percent to ~15% smaller than gzip.
Most published comparisons quote gzip only, or a rounded figure like "under 2 KB"; this index reports both, in exact bytes. For the earlier gzip-only, five-tool version and the "does 140 KB actually matter?" argument, see how much JavaScript analytics tools ship.
Method
- Fetch each script with a desktop Chrome user-agent, asking for the uncompressed file so every tool is compressed the same way:
curl -sL -A "<Chrome UA>" -H "Accept-Encoding: identity" "<script url>" -o tool.js
- Measure gzip by piping through stdin, which avoids the filename and timestamp bytes
gzip -c fileadds to the header:
cat tool.js | gzip | wc -c
- Measure brotli with Node's built-in zlib at its default quality (11), the level a CDN uses to precompress a static asset:
node -e "const z=require('zlib'),fs=require('fs'); \
process.stdout.write(''+z.brotliCompressSync(fs.readFileSync('tool.js')).length)"
The exact URLs measured:
| Tool | URL |
|---|---|
| Simplytics | https://simplytics.dev/track.js |
| Plausible (base) | https://plausible.io/js/script.js |
| Plausible (featured) | .../script.outbound-links.file-downloads.tagged-events.js |
| Fathom | https://cdn.usefathom.com/script.js |
| Cloudflare | https://static.cloudflareinsights.com/beacon.min.js |
| Umami | https://cloud.umami.is/script.js |
| Simple Analytics | https://scripts.simpleanalyticscdn.com/latest.js |
| Pirsch | https://api.pirsch.io/pa.js |
| GoatCounter | https://gc.zgo.at/count.js |
| Counter.dev | https://cdn.counter.dev/script.js |
| Vercel | https://va.vercel-scripts.com/v1/script.js |
| PostHog | https://us-assets.i.posthog.com/static/array.js |
| Litlyx | https://cdn.jsdelivr.net/npm/litlyx-js/browser/litlyx.js |
| Swetrix | https://swetrix.org/swetrix.js |
| Rybbit | https://app.rybbit.io/api/script.js |
| StatCounter | https://www.statcounter.com/counter/counter.js |
| Matomo (demo) | https://demo.matomo.cloud/matomo.js |
| Google Analytics 4 | https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX |
gtag.js is the same file for every measurement ID, so the placeholder above returns what every property loads. It measured about 140 KB gzipped in June 2026 and 150 KB now, so expect drift.
What makes a script small or large?
The cookie-less trackers do one job: send a request when a page loads, follow route changes in single-page apps, and optionally track outbound clicks, downloads and custom events. Simplytics includes all of those as standard and is still the third-smallest script here.
The large scripts carry a data platform into the browser: autocapture, session recording, feature flags, A/B testing, ad attribution or a full tag manager. If you use those, the bytes buy you something. If you only want visits, pages, sources and devices, a script a hundredth the size does the job.
For a site with 50,000 monthly pageviews, Google Analytics' 124 KB brotli adds up to roughly 6 GB of analytics JavaScript a month. Simplytics' 1,074 bytes come to roughly 54 MB. The core reports look similar; the cost on cheap phones does not.
Where Simplytics sits
Simplytics is the third-smallest script here, behind Counter.dev and Litlyx; if minimalism is the whole goal, look at those. Plausible's base script.js (1,122 B brotli) is slightly larger and leaves out outbound-link, file-download and tagged-event tracking; the bundle that includes them (1,838 B) is 1.7 times the size of Simplytics, which ships those features as standard.
Simplytics gives you visitors, views, referrers, countries, devices, traffic channels including AI assistants, sessions, custom events, outbound clicks and funnels from a ~1.2 KB (gzip) cookie-less script, for $12/year, which is exactly $1/month billed yearly, with unlimited sites and pageviews and a 30-day free trial that needs no card. Compare the trade-offs on the comparison pages — Google Analytics, Plausible, Cloudflare Web Analytics — or see the live demo and pricing.
When another tool fits better
Script size alone is a poor reason to switch tools. If you need session replay, autocapture, feature flags and product experiments (PostHog), or the advertising-attribution, audience and BigQuery-export stack (Google Analytics 4), their size buys real capability and Simplytics does not replace them. Simplytics has no session recording, no funnels-of-events product analytics beyond simple funnels, and no ad-platform integrations.
Related: how long analytics tools keep your data and track single-page-app pageviews without cookies.
Last verified: 2026-09-23; Simplytics re-measured 2026-11-12.