What a lot of people don't know is that you're allowed to use cookies for analytics purposes with GDPR, as long as you're anonymizing and as long as they're not used for cross-site/device tracking and advertisement.
The Dutch personal data authority even published a guide for Google Analytics explaining exactly what to do: https://www.autoriteitpersoonsgegevens.nl/sites/default/file... and they ruled that you don't need permission to enable the cookies when you do. You do need to have a privacy policy however.