I think this is why most sites—especially those targeting technical audiences—should rely on server-side analytics instead. Add some middleware to your web framework of choice which logs request data and parse that, or use something like https://www.tabbydata.com (disclaimer: I built that) to pipe it into a data warehouse. Voila! No JS tracking, retain useful metrics.
I’ve used server log analysis, awstats, for maybe 20-25 years. It’s really interesting the difference between awstats and Google analytics (or Adobe analytics, etc).
The reason I keep using Google stats on my backend is convenience and “Google magic” for tracking session length, bounce, behavior, etc etc. I can get most of that out of awstats, but that requires more work.