GA4 wasn't built for Flask. Here's what goes wrong.
Flask-Analytics and similar extensions add unnecessary dependencies to what should be a lightweight Flask app
Flask's template system (Jinja2) requires careful block management to ensure GA code appears in every page without duplication
Managing GA tracking IDs through Flask's app.config and environment variables adds boilerplate to your factory pattern
Flask developers building APIs and microservices don't need GA's full-featured (and full-weight) tracking system
Built for speed, simplicity, and privacy.
One line in your base.html Jinja2 template — no pip install, no extension, no app.config
Works with Flask's template inheritance ({% block head %}) without any special configuration
Lighter than any Flask analytics extension — sub-1KB with zero Python-side dependencies
Perfect for Flask apps with a few pages that just need simple visitor counts and traffic sources
Add StatFast to your Flask project with one snippet.
All the insights. None of the bloat.