Open sandstrom opened 2 months ago
You mean server side?
Depends on what you mean by server-side, but I'm thinking of build-time for popular Single Page Applications (SPAs) such as React, Vue and Static Site Generators such as Astro, Hugo and Gatsby.
For all of them, being able to bundle the simple analytics code among all other JS code (instead of fetching it on every page load) would be a win.
Ah, I see. Bundling with the rest of the bundle. It's not on our roadmap, but always happy to accept pull requests.
Would be nice with instructions on how to install this via NPM, to avoid having to make an HTTP request to pull the file for every page load (i.e.
/latest.js
).This will also help with Adblockers, since the code is instead bundled inside the static HTML/CSS/JS for the website.
Is this possible today? And if so, maybe add some instructions in this repo or in your docs (I've tried to find it, but no luck, but maybe I'm blind 😄)