GA4 wasn't built for Gatsby. Here's what goes wrong.
gatsby-plugin-google-gtag adds 45KB+ of JavaScript and third-party requests that degrade the speed Gatsby is known for
Plugin configuration in gatsby-config.js triggers full rebuilds, slowing down development workflows
Gatsby's page transitions via gatsby-link don't trigger GA pageviews without additional onRouteUpdate configuration in gatsby-browser.js
GA's cookie requirement conflicts with Gatsby's common use case as a privacy-respecting JAMstack framework
Built for speed, simplicity, and privacy.
Add to gatsby-ssr.js or html.js — no plugin installation, no config changes, no rebuild
Sub-1KB script preserves the blazing-fast performance that Gatsby sites are built for
Automatic tracking of gatsby-link route transitions without onRouteUpdate hooks
Cookie-free analytics that match the privacy-first JAMstack philosophy Gatsby developers embrace
Add StatFast to your Gatsby project with one snippet.
All the insights. None of the bloat.