Google Analytics is the default way the web measures itself, and the free tier is genuinely powerful: funnels, audiences, attribution, all wired into Google's ad stack. The cost shows up elsewhere. Your visitor data lives on Google's servers and feeds an advertising business, which is what forces the cookie banner onto every page and turns GA4 into a GDPR conversation with your legal team - and once traffic gets serious, the reports quietly start sampling, so the numbers you act on are estimates, not counts.
The open source alternatives below keep the analytics on infrastructure you run. Pageviews and events land in a database you own, so there is nothing to consent away and no third party reselling the behavior of your audience. Several measure visits without cookies at all, which retires the banner entirely, and because you hold the raw hits, the totals are exact rather than sampled no matter how large the site gets.