🔥 All-Access Pass — $199 USD (Regular $499) · Unlock all 2,836 Astro themes ➔
komal.nakrani
Get All-Access Pass ($199)
ThemesCategoriesDocsBlogTips & TricksPricingGet All-Access Pass ($199)
Comparisons••By Komal Nakrani

Plausible vs Umami vs Fathom for Astro Sites

Plausible vs Umami vs Fathom compared for Astro: open source, self-hosting, privacy, features, events and setup in a layout, with code and a clear pick for each site.

#Astro#Analytics#Plausible#Umami#Fathom

Plausible vs Umami vs Fathom: all three are lightweight, cookieless web analytics tools that drop into an Astro site with one script tag. Plausible is open source with a polished hosted service and an optional self-hosted edition, Umami is open source and the easiest to self-host for free, and Fathom is a paid, closed-source hosted service focused on simplicity and compliance. For most Astro sites, pick Plausible if you want hosted and open source, Umami if you want to run it yourself, and Fathom if you want zero maintenance and are happy paying for it.

Key Takeaways

  • All three avoid tracking cookies and load a small script, so they are far lighter than Google Analytics.
  • Plausible: open source (AGPL), hosted in the EU, Community Edition for self-hosting.
  • Umami: open source (MIT), self-host on Node.js with PostgreSQL, or use Umami Cloud.
  • Fathom: hosted only, not open source, strong focus on compliance and support.
  • In Astro, add the script to your base layout with is:inline, and check page view tracking if you use <ClientRouter />.

Why Astro sites pick privacy-first analytics

An Astro site ships zero JavaScript by default. Adding a large analytics tag undoes part of that work, and a cookie-based tracker usually brings a consent banner with it. Plausible, Umami and Fathom were built for the opposite: a small script, no cookies for tracking, aggregate data instead of personal profiles, and a dashboard that fits on one screen.

Whether you still need a consent banner depends on your jurisdiction and how you use the data, so check with your own legal guidance. Many site owners using these tools choose not to show one, because no tracking cookies are set. Our privacy-friendly analytics tip covers the basic setup, including Cloudflare Web Analytics.

Plausible vs Umami vs Fathom at a glance

Plausible Umami Fathom
License Open source (AGPL) Open source (MIT) Proprietary
Hosted option Plausible Cloud (paid, trial) Umami Cloud (free tier and paid) Fathom (paid, trial)
Self-hosting Community Edition (Docker, ClickHouse, PostgreSQL) Yes (Node.js, PostgreSQL) No
Cookies for tracking No No No
Custom events Yes, plus goals and funnels Yes, plus event data Yes, plus goals
Revenue tracking Yes Via event properties Yes
Public dashboards Yes, shared links Yes, share URLs Yes, shared dashboards
API Stats API REST API API
Ecosystem Large, many integrations Active open-source community Smaller, support-led
Best for Hosted, open source, EU data Free self-hosting, developers Agencies wanting no maintenance

Pricing for the hosted plans is based on monthly page views and changes over time, so check each provider’s pricing page rather than relying on numbers in comparison articles.

Plausible

Plausible is the best-known of the three. The hosted service runs in the EU and is operated by a small, independent team. The dashboard shows visitors, pages, sources, countries, devices and goals on a single page, with filters that combine (for example, visitors from one referrer who reached a goal).

Features that matter for content sites:

  • Goals and funnels for signups or purchases.
  • Custom properties on events, so you can segment by author, category or theme.
  • Outbound link and file download tracking as script options.
  • Search Console integration to see search queries next to traffic.

Self-hosting uses the Community Edition, which runs with Docker and needs ClickHouse and PostgreSQL. It is free, but it is a real piece of infrastructure to keep updated. Most people who choose Plausible use the hosted service.

Umami

Umami is the developer’s pick. It is a Next.js app you can deploy yourself with a PostgreSQL database, on a small VPS or a managed platform, and it costs only what that hosting costs. The dashboard is clean and covers pages, referrers, browsers, OS, devices, countries and events, with reports such as funnels, journeys and retention in recent versions.

Umami Cloud exists if you don’t want to run it, with a free hobby tier for small sites. The MIT license means you can modify and embed it with few restrictions. The trade-off of self-hosting is yours to own: updates, backups, database growth and uptime.

Fathom

Fathom is a hosted, paid service with no self-hosted version. It positions itself on simplicity and compliance, with features such as EU isolation for EU visitors, a clear dashboard, and responsive support. It suits agencies that manage many client sites and want one bill, no servers, and a tool clients understand without training.

The limits are that it is not open source, there is no free plan beyond the trial, and you can’t run it on your own infrastructure.

Adding each script to an Astro layout

All three need one script tag in the <head> of your base layout. Use is:inline so Astro leaves the external script exactly as written instead of trying to bundle it.

---
// src/layouts/Base.astro
const isProd = import.meta.env.PROD;
---
<html lang="en">
  <head>
    <meta charset="utf-8" />
    {isProd && (
      <script
        is:inline
        defer
        data-domain="example.com"
        src="https://plausible.io/js/script.js"
      ></script>
    )}
  </head>
  <body><slot /></body>
</html>

The import.meta.env.PROD check keeps your own development visits out of the stats. The Umami and Fathom tags follow the same pattern:

<!-- Umami -->
<script is:inline defer src="https://cloud.umami.is/script.js" data-website-id="your-website-id"></script>

<!-- Fathom -->
<script is:inline defer src="https://cdn.usefathom.com/script.js" data-site="YOURSITEID"></script>

Always copy the exact snippet from your provider’s dashboard. Script URLs and attribute names change between versions, and a self-hosted Umami uses your own domain in src.

Custom events

Each provider exposes a global function for events. Call it from a component script, with optional chaining so the button still works if an ad blocker removed the analytics script.

---
// src/components/BuyButton.astro
const { href } = Astro.props;
---
<a class="buy" href={href}>Buy theme</a>

<script>
  document.querySelectorAll<HTMLAnchorElement>('.buy').forEach((link) => {
    link.addEventListener('click', () => {
      // Plausible
      (window as any).plausible?.('Buy click', { props: { href: link.href } });
      // Umami
      (window as any).umami?.track('Buy click', { href: link.href });
      // Fathom
      (window as any).fathom?.trackEvent('Buy click');
    });
  });
</script>

Keep only the line for the tool you use. Umami also supports declarative events with a data-umami-event attribute on any element, which avoids JavaScript entirely for simple clicks.

Page views with ClientRouter

If your site uses Astro’s <ClientRouter /> for view transitions, navigations swap the page without a full reload. All three scripts can follow History API navigation, but behavior depends on the script version and options. Check the dashboard after clicking between pages in production. If only the first page is counted, send a page view on Astro’s astro:page-load event:

<script>
  document.addEventListener('astro:page-load', () => {
    (window as any).umami?.track();
  });
</script>

Sites without <ClientRouter /> do a full page load on every navigation, so the default script counts everything. The ClientRouter vs native view transitions comparison explains when you need the router at all.

Performance impact

All three scripts are small and loaded with defer, so they don’t block rendering. A self-hosted Umami or a proxied Plausible script served from your own domain also avoids being blocked by some ad blockers and saves a DNS lookup. If you want analytics off the main thread entirely, Astro’s Partytown integration can move third-party scripts to a web worker, though for scripts this small the gain is minor. The Astro performance guide covers third-party scripts alongside images and fonts.

Choose Plausible, Umami or Fathom

Choose Plausible if you want a hosted, open-source tool with EU hosting, goals, funnels and a large set of integrations, and you are fine paying monthly.

Choose Umami if you are comfortable running a small Node.js app and a PostgreSQL database, want analytics for free on your own server, or need an MIT-licensed tool you can modify.

Choose Fathom if you manage client sites, want no infrastructure and no open-source upkeep, and value support and compliance features over open code.

Choose Cloudflare Web Analytics if your site is already on Cloudflare and page views plus referrers are all you need. It is free and needs no extra account.

Komal themes ship without any analytics script, so you add the one you choose to the base layout in a single line. The installation docs show where each theme’s layout lives, and you can browse the Astro themes if you are still picking a starting point.

FAQ

Is Umami better than Plausible?

Umami is better if you want free self-hosting and an MIT license, because it runs on a simple Node.js and PostgreSQL stack. Plausible is better if you want a polished hosted service with EU hosting, funnels and many integrations. Both are cookieless and lightweight, so the choice is mostly about hosting.

Is Plausible free?

Plausible’s hosted service is paid after a free trial. The Community Edition is free and open source, but you run it yourself with Docker, ClickHouse and PostgreSQL, so you pay for and maintain the server.

None of them set tracking cookies, and they collect aggregate data, which is why many sites use them without a consent banner. Rules differ by country and depend on how you use the data, so confirm with your own legal guidance before removing a banner.

Does Fathom have a free plan?

Fathom offers a free trial but no permanent free plan, and it cannot be self-hosted. If you need free, privacy-friendly analytics, self-hosted Umami, the Umami Cloud hobby tier or Cloudflare Web Analytics are the usual alternatives.

How do I add Plausible to Astro?

Paste the script tag from your Plausible dashboard into the <head> of your base layout and add is:inline so Astro doesn’t bundle it. Wrap it in an import.meta.env.PROD check to skip tracking during development. No Astro integration is required.