A while ago I created this site, I've gained some traffic and recently someone contacted me about the privacy policy with some fair critizimes, the critazisem being that I don't have a privacy policy. I personally get really annoyed by the number of popups and privacy related notifications on every site so I wanted mine to be as compact as possible.
From doing some research I understood that if I want to serve in the EU, I have to ask the user to consent before loading Google Analytics right? Does this mean I can just create a modal on load, ask the user to consent with a link to the privacy policy, and if so are there any compact examples? I found quite a few but those are from sites that also collect data for serving ads etc...
To be 100% complaint (which is good for all Guarantors) you can inhibit Analytics tracking until the user has given consent to cookies, at which point you start the Analytics tag (with a number of contraindications from the point of view of tracking).
Then there are variants, i.e. with the anonymization of the IP of Google Analytics some guarantors consider the Google Analytics cookie as a technical cookie, so if you always keep it anonymized and if you have no other cookies except technical cookies you could also avoid to show the cookiebar. However, it depends on what the Guarantor you refer to says (I know that italian Guarantor said somenthing for which it is clear that with the anonymization of the IP of Google Analytics its cookie may be considered as a technical cookie, so in this case just use anonimyzeIp parameter and GA can also be performed before accepting cookies).
It is a very broad and intricate topic, on the other hand they are legal issues, in any case, in the first case described you are safer, that is by providing Google Analytics only to those who accept cookies.