logo

For Everyone •

For the Planet

Skip navigation
  • [Index]
  • [Blog]
  • [resources]
  • [Connect]
•
•

Explore

  • Why Carbon Footprint Matters
  • The Real Core of UX
  • Tools & Resources

Get Involved

  • Contribute
  • Contact Us

Social

  • LinkedIn
  • Instagram

@2026 devly.digital

TUNIS, TN

Back to Articles
green-web•
Mar 12, 2026
•
14 min read

Your analytics script is the heaviest thing most visitors download

D

Devly Team

Sustainable & accessible Web Development

Table of Contents

  • What your analytics script actually costs
  • The lightweight alternatives
  • The privacy argument
  • sWhat Devly uses
  • The counter-argument: when Google Analytics is justified
  • How to switch

Every time someone visits your website, their browser silently downloads a piece of JavaScript code called a tracking script. This is a small program that runs in the background, watches what the visitor does, which pages they view, where they came from, how long they stay and sends that information back to an analytics service like Google Analytics.

The visitor never sees it. They never click on it. But their browser downloads and executes it on every single page, every single visit.

Google Analytics loads roughly 45 KB of this tracking code onto every page of your website. Multiply that by your monthly traffic and the numbers stop being trivial.

W breaks down the environmental cost of analytics tracking scripts, compares Google Analytics to the lightweight open-source alternatives that have emerged in recent years, and makes the case that switching is one of the easiest Green IT wins available to any website owner.

What your analytics script actually costs

Before we talk about the cost, it helps to understand what actually happens when a visitor lands on a page that runs Google Analytics.

When a visitor's browser loads your page, it encounters a <script> tag in your HTML that points to Google Tag Manager: a JavaScript file hosted on Google's servers at googletagmanager.com.

The browser downloads this file (~28 KB). Once executed, this script immediately fetches a second file: the Google Analytics tag from google-analytics.com (~17 KB)

Once both scripts are loaded and running, they begin collecting data: page URL, referrer, screen size, browser, device, location, scroll depth, engagement time, and more, and send this data back to Google's servers as a series of HTTP requests. This happens on every page the visitor navigates to.

That's roughly 45 KB of JavaScript downloaded, two external server connections made, and tracking data sent back.

Each of these steps has an energy cost. The files must be transferred over the network (consuming bandwidth and powering routers, CDNs, and cell towers), downloaded to the visitor's device (consuming battery), parsed and executed by the browser (consuming CPU cycles), and then tracking data is sent back to external servers (consuming even more network resources).

Note

DNS lookup is how the browser translates a domain name (like googletagmanager.com) into an IP address it can connect to. It's a request to a name server, and it happens for every new domain your page contacts. TCP connection is the handshake between the browser and the server that establishes a reliable communication channel, a back-and-forth process before any data is actually transferred. TLS handshake is the encryption negotiation that happens on top of TCP for HTTPS connections, another round trip to agree on encryption keys.

The two external domains that Google Analytics uses (googletagmanager.com and google-analytics.com) mean the browser performs this full DNS → TCP → TLS sequence twice, before a single byte of analytics data has been collected.

For a site with 100,000 monthly page views, that's roughly 4.5 GB of analytics JavaScript transferred per month. For a site with a million page views, it's 45 GB. And that's just the tracking script, it doesn't include the data payloads sent back to Google's servers on every interaction.

Note

These numbers assume the standard Google Tag Manager + GA4 integration, which is how most sites implement Google Analytics. There are lighter implementations (minimal analytics scripts, self-hosted gtag), but the vast majority of sites use the default setup.

The lightweight alternatives

a new generation of analytics tools has appeared. They share a common philosophy: collect only what you need, use the smallest possible tracking script, and respect user privacy by design.

Well-known ones include Umami, Plausible, Fathom, Cabin, and Simple Analytics. Several of these are fully open source.

What they have in common from a Green IT perspective:

  • Script size: Umami's tracking script is under 2 KB. Plausible's is under 1 KB. Cabin's is 1.2 KB. Google Analytics via GTM is around 45 KB. That's a 20x to 45x difference in JavaScript payload on every page view.
  • No third-party requests: Most lightweight alternatives either self-host or serve their script from a single domain. Google Analytics requires connections to multiple Google-owned domains.
  • No cookies: These tools don't use cookies, which means no cookie consent banners. Consent banners are themselves additional JavaScript, CSS, modal overlays loaded on every page. Removing the need for a consent banner (at least for analytics) reduces your page weight further.
  • Smaller data payloads: Lightweight analytics collect fewer data points per visit: page views, referrers, device type, country. Google Analytics collects hundreds of data points including scroll depth, engagement time, session replay data, and user demographics. More data means more bytes sent back to the server on every interaction.

Pro Tip

Plausible calculated that replacing Google Analytics on a site with 100,000 monthly visitors saves approximately 7 GB of data transfer per month, about 84 GB per year. At an estimated 0.2 kWh per GB of data transfer, that's roughly 16.8 kWh saved annually from a single script change on a single website.

The privacy argument

This article focuses on Green IT, but the privacy dimension deserves a mention because it's the reason most of these tools exist in the first place.

Google Analytics collects personal data, uses cookies, and shares information with Google's advertising ecosystem. This requires cookie consent banners under GDPR (EU), CCPA (California), and similar regulations worldwide. The lightweight alternatives collect no personal data, use no cookies, and require no consent banners. They're GDPR-compliant by design, not by configuration.

What Devly uses

Umami, self-hosted on a VPS at OVHcloud.

Umami is open source and OVH has committed to powering its data centers with 100% renewable energy by 2025, with 77% already achieved. They've signed a long-term solar power purchase agreement with EDF Renewables to supply their French facilities. They use a proprietary liquid cooling system that captures roughly 70% of server heat, report a PUE (Power Usage Effectiveness) between 1.1 and 1.3 across their facilities, and have signed the Climate Neutral Data Centre Pact.

The self-hosting part matters for the Green IT argument. When you self-host Umami, you control the infrastructure. You choose the hosting provider, you know where the data center is, and you can verify its energy sourcing.

Note

f self-hosting isn't for you, Plausible (open source, hosted on renewable-energy-powered Hetzner servers in Germany) and Cabin (100% renewable, with built-in carbon tracking for your website) are strong managed alternatives.

The counter-argument: when Google Analytics is justified

Google Analytics exists because it solves real problems that lightweight alternatives don't fully address. If your business depends on detailed conversion attribution across multiple channels, e-commerce funnel analysis, integration with Google Ads, or audience segmentation for remarketing, GA4 provides capabilities that Umami, Plausible, and Cabin simply don't offer.

But most websites don't need these features. The majority of sites: blogs, documentation, portfolios, small business sites, SaaS marketing pages... need page views, referrers, top pages, and maybe basic event tracking. For those use cases, Google Analytics is dramatically over-engineered and over-heavy.

How to switch

The migration path is simpler than most people expect.

For any lightweight alternative, the process is: add a single <script> tag to your site's <head>, verify data is flowing in the dashboard, remove the Google Analytics script, and remove your cookie consent banner if analytics was the only reason it existed.

Pro Tip

Before removing Google Analytics, export any historical data you want to keep. Some tools, such as Plausible Analytics, offer a Google Analytics import feature that lets you bring your past statistics into their dashboard.

---

Analytics tracking scripts are one piece of a website's overall environmental footprint — but they're a uniquely wasteful one because most sites are loading far more analytics infrastructure than they actually use.

Further reading

Umami: open source, self-hostable, under 2 KB script

Plausible: open source, EU-hosted on renewable energy, under 1 KB script

Plausible: Lightweight Web Analytics : detailed breakdown of script size and energy impact

OVHcloud Sustainability: environmental commitments and reporting

Green hosting check

// newsletter_signup

Build Better

Whether you're just starting to think about sustainability and accessibility or you're ready to overhaul your entire stack, there's a place for you here.

No spam. Unsubscribe anytime. Join 300+ developers.