GA4 wasn't built for Ruby on Rails. Here's what goes wrong.
GA integration in Rails involves a gem (google-analytics-rails or staccato), an initializer, environment credentials, and JavaScript pack configuration
Turbo and Hotwire in modern Rails apps break GA pageview tracking because the page never fully reloads
Rails' asset pipeline and Webpacker/esbuild add complexity to managing GA's JavaScript bundle
Multiple environment configuration (development.rb, production.rb) means tracking IDs scattered across config files
Built for speed, simplicity, and privacy.
One line in application.html.erb — no gem, no initializer, no asset pipeline configuration
Full Turbo and Hotwire compatibility — automatic pageview tracking on Turbo Drive navigations
No JavaScript bundler involvement — the script loads independently of your asset pipeline
Works the same in development, staging, and production without environment-specific configuration
Add StatFast to your Ruby on Rails project with one snippet.
All the insights. None of the bloat.