If you're talking about integrating those analytics in a web-based or downloadable game, then the answer is clear: Google Analytics is indeed a clear GDPR violation and prohibited by those rules. If you need such analytics then you'll need to exclude EU players (or obtained informed/explicit consent ahead of time).
Might be nice to just ask for explicit consent instead of all this cloak & dagger stuff.