I get it. They're required. But they're also a whole lot of technical debt.
In a nutshell, Cookie Popups should do the following:
- Show before running any third-party JavaScript, like Google Analytics
- Only run third-party JavaScript if the user presses Accept
- Manage your cookie preferences, even after closing the menu
- Remember all of this for the next time you visit
That's a whole lot of work if you're using an in-house solution. That's probably why some sites don't even bother to implement any functionality, just showing a shell of a Cookie Popup that doesn't actually do anything except annoy you.
As noted by CSS-Tricks:
There is some irony to the fact that a lot of sites with cookie-consent UI don't even implement the opt-in nature of them, making them useless. [...] It's not the existence of the UI that counts, it's actually not setting the cookies unless you have consent.
While there are lots of third-party solutions that you could use, they have a lot of drawbacks:
- You have limited control over them or what they do
- They usually do not fit your brand
- They can require third-party JavaScript
- They're just another dependency which we otherwise wouldn't need
If I ever add Google Analytics to this site, I might consider designing an in-house solution with HTML, CSS, and JavaScript. That could make a neat article as well.