Everyone knows this. And most projects I work on involve some discussion of cookies and pop-up cookie-consent banners.
The UK rules around cookies are hard to explain, and I won't do so in detail here (Charity Comms have a good overview that's aimed at UK charities but that explains the implications of the rules really well.
Here's another thing: modern web browsers are clamping down on privacy-invasive tracking. Recent versions of Safari (on iOS/iPhone/iPad and Mac's), the Firefox browser and some others will block some tracking services such as Google Analytics by default.
So even if you get a visitor to click to give consent for cookies, you may still not track them in your analytics!
So yes, Google's analytics will become increasingly incorrect, unless they find some way around this blocking.
There are lots of third party services that are commonly used that can set cookies on your site. Common cookie-setting content includes:
There are ways to avoid these by:
And then there's analytics.
This is an often-unanswered question. So many sites I've worked on have complicated, cookie-laden, low-privacy analytics installed that are rarely used.
These tools are often overkill and consideration of simpler options may be beneficial for you, for your visitors, and for your websites usability.
So let's look at what the options are.
There are a few options for analytics these days:
Google Analytics. This is free, and has a huge amount of data and reports and things you can do with it. BUT it's the most complex and privacy-invasive, and requires cookies so you need annoying consent pop-ups where people opt in to have their information tracked. If people don't opt in then you don't get their data. Also, if you're running any Google Ads you probably need Google Analytics anyway.
I use a service called Fathom and the stats for my site are public, so you can see what you get.
Services like this include:
Cloudflare have also recently added an analytics product and this may be a good option, but I've not dived into the details or given it a test run yet.
Free, self-hosted, cookie-free analytics. This is where you run your own analytics software. This sounds like it's free but in reality you still pay for it somewhere as you need to look after the analytics system and data yourself.
If you're using WordPress then your best option here is Koko Analytics. This runs inside of WordPress, is cookie free, and much like older version of Fathom.
For many of my WordPress clients, with a site of their typical size and for the number of visits they are likely to get, option 3 using Koko Analytics is a really good option. But if you can afford to, or if you're not on WordPress, I would strongly recommend paying for a service like Fathom from option 2.
Combine this with removing other third party services as described above, and we don't even need to discuss cookie pop-ups, and they won't get in the way of visitors using your website, AND you won't be blocked by tracking blockers!
It's a huge win all around, for everyone.
If you are running Google Ads or need to do some intricate behaviour tracking, or have some other specific reason to use Google Analytics, then we can go ahead and install it. But in my mind you're just not going to get accurate numbers from it these days because so many visitors will block it or not allow cookies.
Greater privacy is beneficial for everyone. I hope we can work together to make analytics and cookie decisions that ensure we reap these benefits in our project!