UK cookie law is built on two statutes that operate in tandem. PECR regulation 6 prohibits storing or reading information on a visitor's device without consent, unless the storage serves a strictly necessary purpose. The UK GDPR then sets the bar for what consent has to look like: freely given, specific, informed, and delivered through an unambiguous affirmative action, with withdrawal made no harder than the original agreement. For UK visitors, the upshot is an opt-in banner, a reject button given equal prominence to accept, and every analytics or advertising tag held back until the visitor actively agrees.
In a GTM container, the consent tool itself is just one tag among dozens. The real exposure comes from everything else in the container. Google's own tags read Consent Mode and adjust their behavior accordingly, but the majority of third-party tags pay no attention to Consent Mode at all. They run on their assigned triggers regardless, unless you explicitly assign consent requirements to each one. Getting UK consent right in GTM means gating every non-essential tag, not just installing a banner.
| Requirement | What the law expects |
|---|---|
| Consent before non-essential storage | PECR regulation 6 demands consent before storing or reading data on a device, unless the storage is strictly necessary or qualifies for one of the statutory exceptions |
| What counts as consent | The UK GDPR requires a clear affirmative act that is both specific and informed. Pre-ticked boxes and consent inferred from continued browsing do not meet the standard |
| Rejecting | The ICO expects a reject option for non-essential cookies that is equally visible and easy to reach as the accept option, displayed on the same layer of the banner |
| Withdrawing | Visitors must be able to withdraw consent whenever they wish, and the withdrawal process cannot be harder than the original consent was |
| Statutory exceptions | The Data (Use and Access) Act 2025 introduced exceptions for certain analytics, visual-preference and security cookies, provided you give clear information and offer a simple objection mechanism. No exception covers advertising cookies |
How CookieBeam's UK GDPR preset handles it
CookieBeam provides a regional preset designed for UK visitors. Applying it generates an editable rule that ships with the following starting values.
| Setting | CookieBeam preset |
|---|---|
| Who it matches | Visitors in the United Kingdom |
| Banner mode | Opt-in: analytics and advertising stay off until the visitor accepts |
| Buttons | "Accept all cookies" and "Reject non-essential cookies" on the first layer, with equal weight, plus "Cookie settings" |
| Google Consent Mode defaults | ad_personalization, ad_storage, ad_user_data, analytics_storage and personalization_storage start denied |
| Global Privacy Control | Not acted on unless you turn on privacy signals; when on, it pre-selects deny and an explicit opt-in still wins |
| Stored choice | Expires after 182 days, then the visitor is asked again |
Where Google Tag Manager sites leak data
- Tags without consent settings. Any tag left without a consent requirement fires the moment its trigger condition is met, regardless of the visitor's choice. Consent Mode adjusts how Google's tags behave when consent is denied, but it does nothing to stop non-Google tags from running.
- All Pages triggers. A tracking pixel assigned to an All Pages trigger can execute before the consent tool has resolved. Route non-essential tags through CookieBeam's consent events instead.
- Scripts outside the container. Tracking pixels hard-coded directly in the site template bypass GTM entirely and need inert markup to bring them under control.
Consent Mode for UK visitors
Google's EU user consent policy extends to UK visitors alongside the EEA, so Google's advertising products expect Consent Mode signals from UK traffic. CookieBeam's consent tag writes the default values on the Consent Initialization trigger, ahead of every other tag, and fires an update event the moment the visitor makes a choice. Third-party tags that don't read Consent Mode still need their own consent settings or CookieBeam-driven triggers to be properly gated; the Consent Mode docs cover the details.
Set up CookieBeam on Google Tag Manager for UK GDPR and PECR
Publish your banner first
Build the banner in CookieBeam, set up its consent categories, and publish it to production so the loader script has a live configuration to serve. See the quickstart.
Import the CookieBeam container file
Download the web container JSON from the banner's Install page. In GTM, navigate to Admin › Import Container, pick the file and your workspace, select Merge and review the import preview.
Check the consent tag
Confirm the imported tag contains your banner ID and fires on Consent Initialization – All Pages. Keep a single CookieBeam installation per page: don't also paste the loader into the site's HTML.
Set consent requirements on each tag
Consent Mode can allow cookieless pings while consent is denied; it won't block every tag by itself. Give each advertising and analytics tag its own consent settings, or fire it from the cookie_consent_marketing and cookie_consent_statistics data-layer events. Scripts hard-coded outside GTM still need inert markup.
Apply the UK GDPR preset
On the banner's Regional settings page, add a rule from the UK GDPR framework preset. It matches visitors in the United Kingdom with an opt-in banner: analytics and advertising stay off until the visitor accepts. Add the GDPR (EU/EEA) preset too if you also serve EU visitors. See regional rules.
Put every tag in a category
Assign analytics tags to the analytics category and advertising pixels to marketing. Scripts that appear in your reviewed scan inventory are managed by CookieBeam once you turn on blocking; scripts hard-coded in the page need inert markup (type="text/plain" with a data-category attribute) so CookieBeam can control them. See script blocking. In opt-in mode, those scripts stay inert until the visitor accepts the relevant category.
Save, publish and test
Click Save Settings, then Publish in the banner header. Changes to rules only take effect for visitors after you publish. Full install instructions: Google Tag Manager install docs.
Test your GTM container like a UK visitor
- Open the site in a fresh browser profile from the UK, or with a geo-simulated preview, and confirm the opt-in banner appears with both reject and accept buttons on the first layer.
- Before making any choice, open the Network tab: no analytics or advertising requests should have gone out.
- Click reject, reload the page, and verify those requests still haven't appeared.
- Reopen the cookie preferences, accept analytics only, and check that only analytics tags activate.
- Open GTM Preview: examine the consent state on the Consent Initialization event, note which tags fired, and repeat the check after each consent choice.
The cookie banner QA checklist walks through additional checks.
Frequently Asked Questions
Do I need Consent Mode v2 for UK visitors?
If you use Google's advertising features, yes: Google's EU user consent policy covers UK visitors alongside the EEA. Consent Mode doesn't replace the banner; it relays the visitor's decision to Google's tags so they can adjust their behavior.
Does Consent Mode block my tags in GTM?
Not by itself. Consent Mode instructs Google's tags on how to behave when consent is denied; third-party tags need their own consent settings or CookieBeam-driven triggers, or they'll run regardless.
Is the UK GDPR or PECR the law that requires a cookie banner?
PECR is the statute that requires consent before storing or reading information on a device. The UK GDPR defines what valid consent looks like. Both statutes are needed to get the banner right.
Can analytics cookies run without consent in the UK now?
In some cases. The Data (Use and Access) Act 2025 introduced an exception for analytics used solely to improve your own service, provided you give clear information and offer a straightforward way to object, and the data doesn't go beyond the provider assisting you. Analytics tools that use the data for their own advertising are unlikely to qualify. Work through the decision with your adviser; the PECR guide covers the conditions in detail.
Related guides and sources
For Google Tag Manager: Google Tag Manager and consent: the complete setup guide. For the law: PECR and UK cookie law after Brexit, UK GDPR after Brexit, the one-click reject rule. Other platforms: UK GDPR and PECR setup by platform.
Primary sources: PECR regulation 6 (legislation.gov.uk), ICO guidance on PECR.
This page summarises the law as we understand it in October 2026 for website and cookie decisions. It is not legal advice. Statutes, regulations and regulator guidance change, so check the current text with counsel before relying on any threshold or date mentioned here. CookieBeam's regional presets are configurable starting points, not a legal determination for your site.






