Just so you know, opt-out cookie banners are illegal in the EU. If you want to only measure visits, there are alternatives to Google Analytics that don't even require a notice, since they don't record personal information (Plausible is one, but there are many others).