•
•
Devly Team
Sustainable & accessible Web Development
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.
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).
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.
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:
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.
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.
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.
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.
---
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.
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
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.