How much JavaScript does Google Analytics add to your site?

Google Analytics (GA4) is the most widely used analytics tool on the web and one of the heaviest scripts you can add to a site. The size of that script compounds into gigabytes of data transferred every month.

Plausible Analytics was built differently: to give you what you need without the weight of a platform designed for advertising and audience building.

Script size comparison

These are gzipped sizes, which is what browsers actually receive over the wire.

Plausible
2.5KB
gzipped
Google Analytics
135KB
gzipped

Google Analytics is 54x larger than Plausible

That’s the script alone. Most GA4 users also run Google Tag Manager and a cookie consent banner. Configure your setup in the calculator below to see the full cost.

Monthly impact calculator

Enter your monthly visitors and configure your Google Analytics setup to see the real data cost.

What else do you use with GA4?
Cookie consent banner
Plausible
per month
No cookie banner needed
Google Analytics
per month
Data saved per month
CO2 saved per year
estimated

Script sizes measured from CDN. GTM size varies by container configuration. Consent platform sizes vary by version and setup. CO2 estimate uses 0.06 kWh per GB (network energy, Sustainable Web Design model) and 0.445 kg CO2 per kWh (IEA global average).

What those gigabytes actually mean

Data transfer uses electricity at every hop: your server, the network between them, your visitor’s device. The exact energy cost varies by region and infrastructure, but less data always means less electricity used.

Across your traffic, switching from a heavy analytics stack to a lightweight one reduces the total data transferred by gigabytes each month. Add GTM and a consent banner and the gap compounds further.

If you want to estimate the full carbon footprint of your site, the Website Carbon Calculator gives you a per-visitor CO2 estimate.

What most GA4 users actually load

The 135KB figure is just the GA4 script itself. Most sites using GA4 have more on top of it.

Google Tag Manager is how most teams deploy GA4. GTM loads as a separate script before firing GA4’s gtag.js as a second request. A minimal GTM container adds around 30-50KB gzipped. Larger containers with many configured tags can reach 150KB+ on their own.

Cookie consent platforms are required when you use GA4, because GA4 places cookies and collects personal data. Cookiebot adds around 35KB gzipped. OneTrust is heavier at around 121KB gzipped.

Multiple network requests compound the problem. GA4 does not load once and stop. It makes separate requests to Google’s collection servers on each page load, in addition to the initial script download.

A representative breakdown for a site running GTM + GA4 + OneTrust:

Script Gzipped size
Google Analytics (gtag.js) 135KB
Google Tag Manager (gtm.js) 30-50KB+
OneTrust banner SDK 121KB
Total 285-305KB+

Compared to Plausible: one script, 2.5KB. No cookie banner needed.

Why the difference

Google Analytics is built to support advertising attribution, remarketing, cross-site audience building and hundreds of built-in reports. All of that gets downloaded for every visitor whether you use those features or not.

Plausible is built for a narrower purpose: how many people visited, where they came from and what they did. Less scope means less code.

Because Plausible does not use cookies or collect personal data, you do not need a cookie consent banner at all. That removes the entire consent layer from your page, not just the analytics script.

Script weight also affects your Core Web Vitals scores. These are Google’s measures of page speed and responsiveness, and they influence search rankings.

Third-party scripts compete for main thread time even when loaded asynchronously, which directly impacts Largest Contentful Paint and Interaction to Next Paint. Removing a heavy analytics stack is one of the most reliable ways to improve those scores.

For the full picture on analytics and website performance, see lightweight web analytics.

Ready to ditch Google Analytics?
Start your free trial today.