Skip to main content
Back to Guides
Compliance7 min readBy Armin Zaribaf

Webflow Cookie Banner for UK GDPR and PECR: 2026 Setup

UK visitors need an opt-in banner before Webflow sites load analytics or advertising tags, including Webflow's own Analyze and Optimize. Here's the head-code install and how the Webflow bridge works under UK rules.

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.

Webflow provides one clean place for a consent script, the site-wide custom code in <head>, and three places for tracking to escape it: integration fields, embeds in the page body, and Webflow's own Analyze and Optimize features. Under UK rules all three have to wait for an opt-in.

Requirements under UK GDPR and PECR
RequirementWhat the law expects
Consent before non-essential storagePECR 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 consentThe 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
RejectingThe 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
WithdrawingVisitors must be able to withdraw consent whenever they wish, and the withdrawal process cannot be harder than the original consent was
Statutory exceptionsThe 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.

What the UK GDPR preset sets
SettingCookieBeam preset
Who it matchesVisitors in the United Kingdom
Banner modeOpt-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 defaultsad_personalization, ad_storage, ad_user_data, analytics_storage and personalization_storage start denied
Global Privacy ControlNot acted on unless you turn on privacy signals; when on, it pre-selects deny and an explicit opt-in still wins
Stored choiceExpires after 182 days, then the visitor is asked again

Where Webflow sites leak data

  • Integration fields. Analytics or advertising IDs entered in Webflow's own integration settings load outside your consent tool. Move them into tags that your consent tool manages.
  • Embeds in the page body. An HTML embed containing a pixel fires when the page renders, regardless of what the head script decided, unless it's written as inert markup the consent tool activates.
  • Webflow Analyze and Optimize. These are built into the platform rather than being scripts you can tag. CookieBeam controls them through Webflow's tracking-consent API instead.

Webflow Analyze and Optimize for UK visitors

The Webflow bridge gates on the resolved analytics consent state. Under the UK GDPR preset that state starts denied, so the bridge writes deny before Optimize starts and Webflow tracking stays off until the visitor accepts analytics. Accepting flips it on through Webflow's own API; withdrawing flips it off again.

Whether your use of Webflow Analyze qualifies for the UK's analytics exception is a legal judgement about your processing, so CookieBeam doesn't make it for you. Until you and your adviser decide otherwise, the preset treats it like any other analytics tool.

Set up CookieBeam on Webflow for UK GDPR and PECR

1

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.

2

Add the loader to Webflow's head code

Open Site settings › Custom code › Head code and paste the production loader from the banner's Install page as the first script, ahead of Google Tag Manager or any pixel. Custom code requires a paid Webflow site plan. Do not add async or defer. Publish the Webflow site.

3

Leave the Webflow bridge on

Webflow Analyze and Optimize aren't ordinary script tags you can block. CookieBeam controls them through Webflow's tracking-consent API, tied to the analytics consent state. The bridge is enabled by default under Vendor Consent Signals on the banner's App Integrations page.

4

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.

5

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.

6

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: Webflow install docs.

Head code
<!-- Site settings > Custom code > Head code: first line -->
<script
  id="CookieBeam"
  src="https://cdn.cookiebeam.com/banner/PUBLIC_BANNER_ID/default/loader.js"
  type="text/javascript"
  data-cfasync="false" data-no-optimize="1" data-no-defer="1"
  data-no-minify="1" data-noptimize="1" nowprocket data-pagespeed-no-defer
></script>

Test your Webflow site like a UK visitor

  1. 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.
  2. Before making any choice, open the Network tab: no analytics or advertising requests should have gone out.
  3. Click reject, reload the page, and verify those requests still haven't appeared.
  4. Reopen the cookie preferences, accept analytics only, and check that only analytics tags activate.
  5. If Webflow Optimize is active, run wf.getUserTrackingChoice() in the console after each consent choice to verify the state.

The cookie banner QA checklist walks through additional checks.

Frequently Asked Questions

Does Webflow Analyze qualify as an exempt analytics cookie in the UK?

That depends on how the data is used and shared, which is a question for your adviser. Until you decide, the UK preset treats it like any other analytics tool and keeps it off until the visitor accepts.

Where does the consent script go in Webflow?

At the top of Site settings › Custom code › Head code, loaded synchronously, ahead of Google Tag Manager or any pixel.

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.

For Webflow: cookie consent on Webflow. 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.

7 min read

GPP, MSPA & US State Signals: A Publisher's Guide

The US Privacy String you built for CCPA was deprecated in January 2024. GPP, the US National string, and the MSPA replaced it, and getting the signal wrong can be a misrepresentation. Here's how the new US privacy signals move through the ad stack.

5 min read

Building a TCF CMP That Passes IAB Validation

What it takes for a Consent Management Platform to pass IAB Europe's TCF checks: a registered CMP ID, a cleanly decodable TC String, event-listener delivery, and encoding against the right GVL version.

9 min read

How to Migrate Your CMP Without Losing Existing Consent Records

A step-by-step technical guide to switching consent management platforms without losing consent records, triggering mass re-consent, or breaking Consent Mode. Covers export, category mapping, parallel runs, and zero-downtime migration patterns.