Skip to content
AgentThread
Open Source#analytics#privacy#self-hosted#web-analytics#gdpr#cookieless#google-analytics-alternative

Umami: Website Analytics That Don't Feed Google's Data Machine

A lightweight, self-hosted analytics platform that tracks visits, referrers, and device types in real time, with no cookies, no tracking pixels, and no data sent to Google.

AgentThread9 min read
Share

Every website owner eventually faces the same uncomfortable trade-off with Google Analytics: you get useful traffic data, but every visit your readers make gets logged inside Google's infrastructure, associated with their browsing identity across thousands of other sites, and used to improve ad targeting for Google's clients. If that arrangement bothers you, or if a lawyer has pointed out that it creates GDPR liability (the European privacy regulation that requires explicit user consent before personal data is collected and stored), Umami is the self-hosted alternative worth installing.

Umami tracks page views, visitors, referrers, and device types using a small JavaScript snippet you paste into your site's HTML, the same way Google Analytics works. The difference is where the data goes. It goes to your database, on your server, and nowhere else. No cookies are set on your visitors' browsers. No tracking pixel (a 1-by-1 pixel image embedded in a page that silently notifies a remote server when the page loads, used by Google and Facebook to follow users across the web) is involved. Because no personal data is collected and no cookies are written, most legal teams consider Umami exempt from EU cookie consent requirements, which means no consent banner cluttering your pages. The project lives at github.com/umami-software/umami and has 37,967 stars.

FactValue
What it isSelf-hosted, cookieless web analytics
Built byUmami Software (open-source)
LicenseMIT (free to use and modify)
PlatformsDocker, Node.js, Vercel, Railway
RequiresA PostgreSQL or MySQL database; Node.js or Docker
Install methodDocker Compose or one-click cloud deploy
VerdictInstall if you want clean traffic data without cookie consent banners or Google access to your visitor data

What Umami actually is

Umami is a web analytics application that you run yourself. It has two parts: a small JavaScript snippet that you add to every page of your website, and a server-side application with a dashboard that collects the data that snippet sends.

When a visitor loads a page on your site, the snippet fires a single lightweight request to your Umami server recording the page URL, the referrer (the URL of the site the visitor came from, if any), the visitor's device type and browser, and the country inferred from their IP address. That IP address is never stored. The data that lands in your database is an anonymized event record. You can see that someone from Germany visited your pricing page from a LinkedIn post; you cannot link that visit to a specific person or track that same person across your site over time.

The dashboard shows you real-time data: how many people are on your site right now, which pages are getting the most views, where your traffic is coming from, what devices your visitors use, and where in the world they are located. It also tracks UTM parameters, the campaign tags marketers attach to URLs (for example, a URL ending in ?utm_source=newsletter&utm_medium=email lets you see exactly how much traffic a specific email sent). Custom events let you track specific user actions, such as button clicks, form submissions, or file downloads, by adding one line of JavaScript to the relevant element on your page. All of that data is yours, stored in a PostgreSQL or MySQL database (both are standard open-source relational databases that any developer can set up and back up) that you control.

The MIT license means there are no restrictions on commercial use, modification, or redistribution.

What you get after installing it

The Umami dashboard is clean and direct. There are no segments, no funnels, no audience definitions, and no attribution modeling. What you see is what happened.

The main metrics panel shows the total number of visitors (people), page views (pages loaded), sessions (contiguous visits), average visit duration, and bounce rate (the percentage of visitors who view only one page and then leave) for any date range you choose. Filters narrow the view to a specific page, referrer, browser, OS, device type, country, or UTM campaign.

The pages report lists every URL on your site ranked by page views, with unique visitor counts alongside. You can sort by either column and export the table as CSV (a spreadsheet format, comma-separated values, readable in Excel or Google Sheets).

The referrers panel shows where your traffic originates: direct visits, search engines, social platforms, newsletters, or specific websites that linked to you. This is often the most actionable report because it tells you which external sources are actually driving readers to your site.

Custom events let you track anything beyond page views. If you add the Umami script to your app, you can call umami.track('signup-click') in a button's onClick handler and see that event count in the dashboard alongside your page view data. No separate event pipeline or analytics SDK is required.

Multi-website support means one Umami install manages analytics for any number of websites. Each site gets its own tracking snippet and its own isolated data view inside the same dashboard.

API access is built in. Every metric available in the dashboard is also queryable via a REST API (a way of requesting data over HTTP, the same protocol your browser uses), which means you can pull your own traffic data into spreadsheets, dashboards, or custom reports without scraping the UI.

The install experience

The fastest path for non-coders is a one-click deploy to Railway or Vercel. Both platforms have Umami templates that provision the application and a database together in about three minutes, with no command-line work required.

For self-hosters who want full server control, Docker Compose is the recommended method. Docker is software that runs applications inside isolated containers, and Docker Compose is the tool that starts multiple containers together (in this case, the Umami application and its database). The steps:

  1. Install Docker and Docker Compose on your server (standard instructions are in the Docker documentation)
  2. Copy the official docker-compose.yml file from the Umami repository
  3. Set a DATABASE_URL environment variable (a named configuration value that a running application reads at startup) pointing to your PostgreSQL or MySQL instance
  4. Run docker compose up -d (the -d flag means "detached," so the containers start in the background)
  5. Open your server's IP address at port 3000 in a browser

The default login is username admin, password umami. Change both immediately.

Adding Umami to your website is one paste operation. The dashboard generates a snippet like this:

<script defer src="https://your-umami-server.com/script.js" data-website-id="abc123"></script>

Paste this into the <head> section of every page. If you use WordPress, a plugin called WP Code lets you add it site-wide without editing theme files. If you use Webflow, Squarespace, or any similar hosted site builder, there is usually a "custom code" or "header injection" field in settings where this snippet goes. Once it is there, data starts appearing in your dashboard within seconds of the first page load.

The one setup requirement worth knowing upfront: Umami needs a database to write to. The Docker Compose path spins up a PostgreSQL database automatically alongside the application, so you do not need to provision one separately. If you deploy to Railway or Vercel, those platforms add a managed database with one click. The only scenario where this adds friction is if you want to use an existing database server and need to configure the connection string manually.

Where it fits and what to compare it to

Umami replaces Google Analytics in situations where privacy compliance, data ownership, or the removal of a cookie consent banner is a real concern. It does not replace Google Analytics in every situation: if you depend on Google's machine learning attribution, audience segmentation, or integration with Google Ads, Umami does not offer those features and is not trying to.

Google Analytics 4 (the current version, which replaced the older Universal Analytics in 2023) is free and deeply integrated with Google's ad ecosystem. It requires cookie consent in the EU under most legal interpretations, and all visitor data is stored in Google's infrastructure. The features are extensive but the interface is complex. For simple "how many people visited my site and from where" questions, it is significantly over-engineered.

Plausible is the most direct open-source competitor to Umami. It is also cookieless and privacy-first, has a cleaner UI than Umami, and is similarly GDPR-friendly. Plausible uses the AGPL license (a variant of the GPL open-source license that requires any modified version you run as a service to be open-sourced), while Umami uses the more permissive MIT license. If you are building a product that embeds analytics for your customers, the MIT license matters. Plausible is also available as a hosted service starting at $9 per month.

Fathom is a paid privacy-first analytics tool. It has a hosted-only model with no self-hosted option, starting at $15 per month. The interface is extremely polished, but if your reason for switching is avoiding third-party data processing entirely, paying Fathom still means your data is on their servers.

The choice is direct. If you want your visitor data owned entirely by you with no monthly fee and no cookies, Umami is the right tool. If you want someone else to manage the infrastructure and are comfortable paying for it, Plausible's hosted version is the easier ongoing experience.

Verdict

Install Umami if you are tired of the cookie consent banner, have a GDPR concern to address, or simply do not want Google indexing your visitors' behavior. The install is fast on Railway or Vercel with no command-line work, or slightly longer via Docker Compose on a server you control. Either way, you end up with a real-time analytics dashboard that answers the questions most websites actually need answered: how many people visited, where they came from, which pages they read, and on what devices.

The 37,967 GitHub stars reflect a project with significant real-world deployment behind it. The documentation at umami.is is thorough, the setup scripts are stable, and the community around it is active enough that edge cases are well-covered in the issue tracker.

Hold off if you need audience segmentation, multi-touch attribution modeling, or direct integration with an ad platform. Umami tracks what happened on your site; it does not build behavioral profiles or integrate with paid acquisition channels. For those use cases, Google Analytics 4 or a paid analytics platform is the appropriate tool.

One detail worth knowing before you install: if you host Umami on a subdomain of your own site (for example, analytics.yoursite.com), ad blockers and browser privacy settings are less likely to block the tracking script than they would be for a third-party domain. Your traffic counts will be more accurate than they would be with Google Analytics, where a meaningful percentage of privacy-conscious visitors are never counted at all.

Related posts