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 the tracking script for 17 analytics tools was downloaded and compressed the way a real web server sends it — once with gzip, once with brotli, which most browsers now prefer. The full table, the exact commands, and the raw numbers are here so anyone can rerun them.
Size is not the only thing that matters, and the smallest script does not automatically win. But it is the one number a vendor rarely publishes plainly, and it is the part of an analytics tool that every visitor pays for on every page load, whether or not they ever look at a report.
How big is each analytics script?
Sorted from smallest to largest by brotli transfer size — the bytes a modern browser actually pulls over the wire. All figures measured 23 September 2026.
| Tool (script) | gzip | brotli | vs Simplytics (brotli) |
|---|---|---|---|
Counter.dev (script.js) |
438 B | 326 B | 0.2× |
Litlyx (litlyx.js) |
1,199 B | 995 B | 0.6× |
Plausible, base (script.js) |
1,286 B | 1,122 B | 0.7× |
Simplytics (track.js) |
1,889 B | 1,599 B | 1× |
Fathom (script.js) |
2,087 B | 1,793 B | 1.1× |
Vercel Web Analytics (script.js) |
2,019 B | 1,829 B | 1.1× |
| Plausible, with outbound links + downloads + events | 2,079 B | 1,838 B | 1.1× |
Umami (script.js) |
2,333 B | 2,054 B | 1.3× |
GoatCounter (count.js) |
3,317 B | 2,795 B | 1.7× |
Pirsch (pa.js) |
3,507 B | 3,050 B | 1.9× |
Simple Analytics (latest.js) |
3,827 B | 3,407 B | 2.1× |
Swetrix (swetrix.js) |
6,236 B | 5,474 B | 3.4× |
Cloudflare Web Analytics (beacon.min.js) |
10,133 B | 9,176 B | 5.7× |
Rybbit (script.js) |
10,872 B | 9,746 B | 6.1× |
StatCounter (counter.js) |
17,534 B | 15,666 B | 9.8× |
Matomo (public demo matomo.js) † |
65,508 B | 56,090 B | 35× |
PostHog (array.js) ‡ |
98,375 B | 82,982 B | 52× |
Google Analytics 4 (gtag.js) |
150,363 B | 124,252 B | 78× |
† Matomo's number is from its public demo instance, which loads plugins a plain install would not. A default self-hosted Matomo is smaller; a commonly cited forum figure is around 20 KB, but that is not something measured here, so treat the demo row as an upper bound rather than a like-for-like default.
‡ PostHog's array.js is a loader that also pulls in autocapture and session-replay code; it does far more than count pageviews, and its size reflects that. The same caveat applies in reverse to the small scripts: they do less.
The privacy-first, cookie-less tools cluster tightly between roughly 0.3 KB and 5.5 KB brotli. The gap that matters is not between them — it is between the whole group and the general-purpose suites. Google Analytics 4 alone ships about 78 times more compressed JavaScript than Simplytics, and PostHog about 52 times more, before any tag manager or consent banner is added.
Why measure brotli, not just gzip?
Because brotli is what your visitors mostly receive. Brotli is supported by every current version of Chrome, Firefox, Safari and Edge, and when a browser advertises it in its Accept-Encoding header a CDN will serve the brotli-compressed file in preference to gzip. For static assets, brotli is typically a few percent to ~15% smaller than gzip on the same file, which is exactly the pattern in the table: Simplytics is 1,889 B gzipped but 1,599 B brotli, and Google Analytics is 150,363 B gzipped but 124,252 B brotli.
Most published script-size comparisons quote gzip only, or a rounded marketing figure like "under 2 KB". Both are legitimate, but neither is the number a browser on a modern connection actually downloads. Reporting both, in exact bytes, is the point of this index. If you want the older gzip-only, five-tool version with the "does 140 KB actually matter?" argument spelled out, that is the earlier post, how much JavaScript analytics tools ship.
Method
Every script was fetched on 23 September 2026 with a desktop Chrome user-agent string, asking the origin for the uncompressed file so the compression below is done identically for every tool rather than trusting each CDN's own settings:
curl -sL -A "<Chrome UA>" -H "Accept-Encoding: identity" "<script url>" -o tool.js
gzip transfer size was measured by piping the file through gzip over stdin, which matches how these figures have always been taken for Simplytics and avoids the filename and timestamp bytes that gzip -c file would add to the header:
cat tool.js | gzip | wc -c
brotli transfer size was measured with Node's built-in zlib at its default quality (11), the same level a CDN uses when it precompresses 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 |
Two figures need a note on reproducibility. gtag.js is served from the same URL regardless of the measurement ID, so the placeholder ID above returns the same file every property loads; it measured about 140 KB gzipped in June 2026 and 150 KB now, so Google's script has grown, and any figure you find will drift over time. Matomo and PostHog, as flagged under the table, are not pageview-only scripts, so their size is not comparable to the single-purpose trackers.
What makes a script small or large?
The single-purpose, cookie-less trackers are small because they do one thing: they send a request when a page loads, handle route changes in single-page apps, and optionally track outbound clicks, downloads and custom events. That is a few kilobytes of logic. Simplytics, at 1,599 B brotli, includes single-page-app auto-tracking, outbound-click and download tracking, and custom events as standard, which is why it sits slightly above the very smallest scripts that leave those features out.
The large scripts are large because they carry a general-purpose data platform into the browser: autocapture of every click, session recording, feature flags, A/B testing, ad-attribution and audience code, or a full tag-management runtime. If you use those features, the bytes buy you something. If you only want to know how many people visited, which pages they read, where they came from and on what device, you are downloading — and asking every visitor to download — a large amount of code for numbers a script a hundredth of the size can produce.
For a site with 50,000 monthly pageviews, the difference is concrete. At Google Analytics' 124 KB brotli, visitors collectively download roughly 6 GB of analytics JavaScript a month. At Simplytics' 1.6 KB, it is roughly 80 MB. The reports look broadly similar for the essentials; the transfer cost, and the parse-and-execute cost on cheap phones, does not.
Where Simplytics sits, honestly
Simplytics is the fourth-smallest script in the table, behind Counter.dev, Litlyx and Plausible's base script. That ordering is real and worth stating plainly: if the single smallest possible byte count is your only criterion, three tools here beat Simplytics, and Plausible's base script has beaten it since these were last measured.
The difference is what each script does at that size. Plausible's base script.js (1,122 B brotli) does not include outbound-link, file-download or tagged-event tracking; the bundle that does — the feature-matched row at 1,838 B — is slightly larger than Simplytics, which ships those features in the base script. So Simplytics and a feature-matched Plausible are within a couple hundred bytes of each other, both an order of magnitude under the general-purpose suites. Counter.dev and Litlyx are smaller still and are worth a look if minimalism is the whole goal.
Simplytics' pitch is a lot of functionality for a lot less money: the essential numbers — visitors, views, referrers, countries, devices, traffic channels including AI assistants, sessions, custom events, outbound clicks and funnels — from a ~1.8 KB (gzip) cookie-less script, for $12/year, which is exactly $1/month billed yearly, with 50,000 pageviews a month across up to 12 websites and a 30-day free trial that needs no card. You can weigh the rest of the trade-offs on the comparison pages, including the full Google Analytics comparison, the Plausible comparison, and the Cloudflare Web Analytics comparison, or see the numbers on the live demo and the pricing.
Where Simplytics is not the right choice
Script size is a poor reason to switch tools on its own, and this index is not an argument that the smallest number wins. If you need what the large scripts carry — session replay, autocapture, feature flags and product experiments (PostHog), or the full advertising-attribution, audience and BigQuery-export stack (Google Analytics 4) — then their size buys you 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. It is a privacy-first, cookie-less tool for the essential web-traffic numbers. If those essentials are what you want, the byte counts above are a strong reason to prefer a small script; if you need the rest, pick the tool that does the rest, and accept the bytes.
For related reading: how these tools differ once the traffic is in the database, in how long analytics tools keep your data; how the small cookie-less scripts handle framework routing, in track single-page-app pageviews without cookies; and an earlier byte measurement in how much JavaScript analytics tools ship.
Last verified: 2026-09-23.