GA4 wasn't built for Hugo. Here's what goes wrong.
Hugo's built-in GA template loads the full 45KB gtag.js bundle, adding more JavaScript than the rest of your static site combined
Configuring GA in Hugo requires editing config.toml/yaml, adding the internal template to baseof.html, and managing the googleAnalytics config key
Static sites rarely need GA4's complex event tracking — most Hugo users only care about visitor counts and traffic sources
GA's cookie requirement forces Hugo site owners to add a consent banner to what should be a simple, lightweight static site
Built for speed, simplicity, and privacy.
One line in your baseof.html partial — simpler than Hugo's built-in GA template
Sub-1KB script keeps your static site truly lightweight, preserving Hugo's speed advantage
No Go template variables, no config.toml changes, no build-time dependencies
Cookie-free tracking means no consent banners cluttering your clean Hugo theme
Add StatFast to your Hugo project with one snippet.
All the insights. None of the bloat.