Analytics for GitHub Pages and static sites

Entry price is the lowest monthly price the vendor lists; “Free” means a free plan or free self-hosting. “At 100k” is the monthly price for 100,000 units, as the vendor bills them. Dates under statuses, prices and script sizes show when we checked them. See how we check every value.

What puts a tool on this page

A tool is counted here when the vendor publishes a guide of its own for pages served from GitHub or GitLab, or for a site generator such as Hugo, Jekyll, Eleventy or Astro. A line saying the snippet works wherever you can paste code is not a guide, an integration written by somebody else does not count, and a single package for one JavaScript framework is not a route for static sites in general.

Fourteen more tools read “Partly” in that row for those reasons. Some are covered only by community plugins for Gatsby or Docusaurus that the vendor links to without maintaining, as with Ackee, GoatCounter and Umami. Fullstory has a GitHub Pages page describing a community integration that it says is not officially supported or maintained by Fullstory. Others document Astro and stop there. The difference matters more here than elsewhere, because with no server involved the guide is the whole installation.

What changes without a server of your own

Everything is measured from the page. There is no admin to install a plugin into, no module in front of the site and no request log to read afterwards, so log analysis and server-side tagging are out unless your host offers them.

The snippet goes into the layout the generator wraps around every page, which is why the guides name a file, not a settings screen: a base layout, an include, a partial, inherited by pages you have not written yet.

Local builds need a guard, or your own browsing turns into traffic. The Jekyll guides here wrap the snippet in a production condition, and the Swetrix and Rybbit pages note that GitHub Pages sets that environment during its own build, which leaves the local case to you.

Two consequences are easy to miss. Routing tracking requests through your own domain, which several vendors document as a proxy, needs a server or an edge worker, neither of which GitHub Pages gives you. And bot traffic can only be filtered by the vendor, since nothing of yours sits in front of the site, which makes the bot filtering column a question worth asking.

What the vendor guides actually cover

The guides differ in how far they go. Swetrix publishes pages for Jekyll, Hugo, Eleventy, Hexo, MkDocs, VitePress, Docusaurus and Astro, and its Jekyll page carries both the production condition and the GitHub Pages note. Rybbit covers Jekyll, Hugo, Eleventy, Hexo and Zola. Fathom describes Jekyll as the generator often used with GitHub Pages and gives it a section of its own. Databuddy documents Jekyll and Hugo with production-only includes, Simple Analytics covers Hugo, Gatsby, Docusaurus and Astro, and Cabin has sections for Hugo, Astro and Gatsby.

Two entries rest on narrower ground. Matomo answers in a FAQ written for GitHub-hosted pages, and the answer is to paste the tracking code into the HTML files before the closing head tag, a file-by-file instruction rather than a template one. Microsoft Clarity’s route to a static site is a Gatsby plugin from Microsoft’s own repository, archived in 2026, so the guide stands while the code stops moving. Read the date on any of these before following it.

How to choose

  1. Start from your generator. A guide for the one you use saves an evening; without it you place the snippet in a layout yourself, which is ordinary work but yours to maintain.
  2. Decide early whether requests should come from your own domain. On GitHub Pages they cannot, so either accept the vendor’s domain or move to a host with workers or a proxy.
  3. Read the bot filtering column, since it is the only filtering you get.
  4. Check a free plan against its conditions rather than the word Free. One here is meant for hobby sites and asks for a badge, a site cap and a short history; the card says which.
  5. Compare storage location, retention and price at your traffic last, in each vendor’s unit; the methodology covers those columns.

Questions and answers

Can analytics run on GitHub Pages at all?

Yes. A static host serves files, and a tracking script is one the page loads like any other, so measurement happens in the visitor’s browser and the data goes to the vendor. What you give up is everything that needs a server of your own: log analysis, server-side tagging and a proxy on your domain.

My generator is not in any guide. What then?

Use the plain snippet in the base template, the one every page inherits, then guard it so local and preview builds send nothing. Check by loading a built page and watching the request it sends. Vendors that document several generators describe the same two steps, so a guide for a neighbouring one is usually close enough to follow.

That depends on the rules where you and your visitors are, on how the tool is configured and on what else the pages load; this directory does not give legal advice. What can be checked is what the script stores in the browser: the Cookieless column follows the script rather than the vendor’s wording, and the cookieless page explains it. Vendors stating that no banner is needed are collected on the EU storage page as their own position.

Other collections