There are several good privacy-focused alternatives to Google Analytics, that give you detailed website stats but without your users being tracked.
Personally I use Fathom Analytics ($10 off with that link) and am very happy with it, so I made a few videos to show how I get the most out of it.
Measuring Engagement With Events
Growth Strategies With Event Filtering
Google Analytics remains incredibly pervasive of course, but every website that switches to a privacy-focused alternative means better data protection for thousands or even millions of users. There’s still a long way to go but it’s great to see the healthy competition in this sector.