GA4 wasn't built for Astro. Here's what goes wrong.
GA4's 45KB script contradicts Astro's zero-JS-by-default philosophy and negates the performance wins of partial hydration
Astro's @astrojs/partytown integration for GA adds complexity and sometimes breaks with content security policies
View Transitions in Astro require manual GA pageview calls since the page doesn't fully reload between navigations
Most Astro users build content sites and docs — GA4's enterprise event tracking is wildly over-engineered for this use case
Built for speed, simplicity, and privacy.
Sub-1KB deferred script that aligns with Astro's minimal-JavaScript philosophy
Automatic tracking of View Transitions and client-side navigations without custom code
No Partytown, no web workers, no islands required — just a plain script tag in your layout
Perfect for content sites: see which pages drive traffic, where readers come from, and what's trending
Add StatFast to your Astro project with one snippet.
All the insights. None of the bloat.