Free Google Analytics alternative: Umami self-hosted
TL;DR
- Umami: open source analytics, no cookies, no GDPR banner, data on your server
- What you lose: user recurrence (doesn’t identify across sessions)
- Setup: PostgreSQL + Docker + a script on your site
- Trick: use
TRACKER_SCRIPT_NAME: scriptto avoid adblockers
Cookie-free analytics: Umami self-hosted in 15 minutes
The problem with Google Analytics
You want to know how many people visit your site. Normal. But for that you have to:
- Give your users’ data to Google
- Put up that cookie banner that covers half the screen
- Pray that 80% of users don’t click “reject all”
- Comply with GDPR, which basically means legal forms nobody reads
For a personal blog, it’s overkill.
The alternative: Umami
Umami is open source, self-hosted analytics that:
- Uses no cookies: Nothing gets stored in the user’s browser
- Doesn’t track individuals: Only aggregate metrics
- Requires no GDPR banner: No personal data, no consent needed
- Is yours: Data lives on your server, not some megacorp’s
You still get page views, countries, browsers, devices, referrers… Everything you need to know if anyone reads your blog. Without the legal theater.
What you lose
Let’s be honest: you lose recurrence. Umami can’t tell you “this user came back 3 times this month” because it doesn’t identify users across sessions.
For a personal blog, I don’t care. When I have a SaaS with registered users, the auth system itself will give me that info.
The setup: PostgreSQL + Docker
I have mine running on a VPS with Easypanel, but any Docker setup works.
1. Database
CREATE DATABASE umami;
CREATE USER umami WITH PASSWORD 'your_password_here';
GRANT ALL PRIVILEGES ON DATABASE umami TO umami;
-- PostgreSQL 15+ also needs this:
\c umami
GRANT ALL ON SCHEMA public TO umami;
ALTER SCHEMA public OWNER TO umami;
2. Docker Compose
services:
umami:
image: docker.umami.is/umami-software/umami:postgresql-latest
environment:
DATABASE_URL: postgresql://umami:your_password@your_host:5432/umami
APP_SECRET: generate_something_with_openssl_rand_base64_32
TRACKER_SCRIPT_NAME: script
restart: always
The trick is TRACKER_SCRIPT_NAME: script. By default Umami uses umami.js, which adblockers have on their lists. With script.js it flies under the radar because it’s too generic to block.
3. Add the script to your site
<script defer src="https://your-analytics-domain/script.js" data-website-id="your-website-id"></script>
You get the data-website-id from the Umami panel when you create the site.
The result
Analytics that work even with adblockers, no cookies, no banners, with data on your server.
When someone asks “why don’t you have the cookie notice?”, you can answer: “Because I don’t use them.”
Found this useful? I’ve got more self-hosting guides in the drawer.
Privacy and data ownership is one of the AI trends in 2026. If you don’t want to hand your data to big tech, self-hosting is the way.
You might also like
Self-Hosting Guide: Control Your Data and Save Money
Why host your own tools, what stack to use, the best self-hosted alternatives, and when it's NOT worth it.
GenBI: the end of the data analyst bottleneck
What is Generative Business Intelligence, why ChatGPT+SQL doesn't work, and how the semantic layer changes the game. What it means for your career as an analyst.