By Rakibul Hasan, Moonlab
If your website serves visitors in the UK or EU and uses cookies or similar technologies that are not strictly necessary, such as analytics or advertising tags, you generally need to get consent before they are set. A banner that says by using this site you agree is not enough.
This guide explains the basics in plain terms: the rules, what counts as essential, what a compliant banner looks like and what Google Consent Mode v2 is. This is not legal advice. Rules vary by country and are interpreted by regulators, so check with a qualified adviser, and read your national regulator's guidance, such as the ICO in the UK.
The rules in short
In the UK, the Privacy and Electronic Communications Regulations (PECR) govern cookies and similar technologies, alongside UK GDPR for personal data. In the EU, the ePrivacy Directive, implemented in each country, works with the GDPR.
The common principle is that you need consent for storing or accessing information on a visitor's device, unless it is strictly necessary for a service the user asked for. Consent must meet the GDPR standard: freely given, specific, informed and an unambiguous action.
What needs consent and what does not
Strictly necessary cookies, such as ones that remember items in a basket or keep a login secure, do not need consent, although you should still mention them in your policy. Most others do.
- Usually needs consent: advertising and retargeting tags, social media pixels, most analytics cookies.
- May not need consent: security, load balancing, basket contents, remembering a consent choice.
- Regulators differ on some analytics. Some allow limited, privacy friendly analytics without consent. Check your regulator's guidance.
Google Consent Mode v2, in general terms
Google Consent Mode lets your site tell Google tags whether a visitor has agreed to analytics and advertising storage. The tags then adjust their behavior. Version 2 added signals for ad user data and ad personalization, and Google has said it is needed to use some features with audiences in the European Economic Area.
Consent Mode does not replace a consent banner. You still need a properly set up consent management platform that sends the choice to Google. Check Google's current documentation for the exact requirements, because they change.
Setting it up on your site
Choose a consent management platform that suits your site, such as one built into your website builder or a dedicated service. Check its pricing and whether it supports Consent Mode v2 and your country's rules.
Then test. Open your site in a private window, decline cookies and use browser developer tools to check that no analytics or ad cookies are set. Test again after any change to your tags.
What about the US?
The US has no single cookie consent law. Some states have privacy laws that give residents opt out rights for targeted advertising and the sale of data, and California's rules are a well known example. If you serve US visitors, check which state laws apply and offer clear opt out options. Ask a professional.
A worked example and common mistakes
Here is a made-up example. A furniture shop in Lyon sells across the EU and the UK, and uses Google Analytics, a Meta pixel and a live chat widget. Its banner currently says that by continuing you accept cookies, and the tags fire as soon as the page loads.
The owner replaces it with a consent platform. The banner now has Accept all, Reject all and Choose buttons of equal weight, and groups cookies into necessary, analytics and marketing. The tags are set up through a tag manager so analytics and the Meta pixel only fire after consent for their category. Consent Mode v2 is enabled so Google tags receive the visitor's choice. The chat widget is moved behind the functional or marketing category, depending on what it stores.
She tests in a private window, rejects all, and uses the browser developer tools to confirm that no analytics or marketing cookies are set. She then accepts and confirms they load. She adds a footer link to reopen settings, updates the cookie policy with the list of cookies, and schedules a quarterly check for new trackers.
A professional can confirm the setup for her markets. Here are the mistakes to avoid.
- Loading tags before consent.
- Making Reject harder to find than Accept.
- Pre ticked boxes.
- Copying a policy that lists cookies you do not use.
- Forgetting trackers added by plugins or embedded videos.
- No way to change your mind later.
- Assuming a banner alone makes Consent Mode work.
How to decide and what to do this week
A short self check helps you see where you stand before you speak to a professional. Go through each point on your live site.
- Open the site in a private window and decline everything. Are any analytics or marketing cookies set?
- Does the banner give Accept and Reject equal prominence?
- Is there a footer link to change your choice?
- Does your cookie policy list what the site really uses?
- Do you know which plugins and embeds add trackers?
- Is Consent Mode set up, if you run Google ads or analytics for EU visitors?
How Moonlab can help
We set up consent tools, tag management and tracking in a way that respects choices. See moonlab.space/services/web-development and moonlab.space/services/data-and-analytics. For AI and data questions, see moonlab.space/guides/gdpr-ai-automation.
A free 30-minute automation audit at moonlab.space/contact can cover your tracking setup.
