GA4 wasn't built for Express.js. Here's what goes wrong.
Express has no standard GA integration — developers cobble together solutions using universal-analytics, server-side middleware, or manual template injection
Different template engines (EJS, Pug, Handlebars) each require different syntax for injecting GA code, leading to inconsistent implementations
Server-side GA tracking via the Measurement Protocol requires API secrets, user-id management, and HTTP request handling
Express apps often serve as API backends — GA's client-side focus doesn't fit the Express architecture well
Built for speed, simplicity, and privacy.
One script tag in your template layout — works identically with EJS, Pug, Handlebars, or static HTML
No Express middleware, no route handlers, no server-side tracking code needed
Works perfectly for server-rendered Express apps with client-side navigation
Sub-1KB script keeps your Express app's response payload minimal
Add StatFast to your Express.js project with one snippet.
All the insights. None of the bloat.