A cookie banner asks website visitors for consent before non-essential cookies are set. Learn when you need one, GDPR requirements, dark patterns to avoid, examples and how to add one.
A cookie banner is the pop-up or bar a website shows to visitors on their first visit to tell them about the cookies and trackers it uses and to ask for their consent. Under the GDPR and the ePrivacy Directive, websites that use non-essential cookies, such as analytics or advertising cookies, must get opt-in consent before setting them, and the cookie banner is how most websites collect that consent.
| Term | Meaning |
|---|---|
| Cookie banner | The pop-up, bar or box that informs visitors about cookies and collects their choice. Also called a cookie consent banner or cookie pop-up. |
| Cookie notice | A banner that only informs visitors, without offering a real choice. Not enough for GDPR consent. |
| Preference center | The second layer of the banner where visitors can accept or reject individual cookie categories or vendors. |
| Cookie policy | The page that lists the cookies you use, their purpose, provider and duration. The banner should link to it. |
| Cookie wall | A banner that blocks access to the site until the visitor accepts cookies. Generally not allowed in the EU without a genuine alternative. |
| Consent Management Platform (CMP) | The software that shows the banner, blocks cookies until consent, stores consent records and passes consent signals to vendors. |
| Region | Cookie banner required? |
|---|---|
| EU and EEA (GDPR and ePrivacy Directive) | Yes, if you use any cookies or trackers that are not strictly necessary. Consent must be opt-in and collected before those cookies are set. |
| United Kingdom (UK GDPR and PECR) | Yes, under the same opt-in rules for non-essential cookies. |
| Switzerland (nFADP) | Transparency is required; opt-in consent is expected for many tracking uses. A banner is the common approach. |
| United States (CCPA/CPRA and state laws) | An opt-in banner is not generally required, but you must offer an opt-out of the sale or sharing of personal data, such as a "Do Not Sell or Share My Personal Information" link, and honour Global Privacy Control signals. Many sites use a banner to do this. |
| Brazil (LGPD), Canada, and other countries | Rules vary; many regulators expect clear information and consent for non-essential tracking. |
If your website only uses strictly necessary cookies, such as a session cookie for a shopping cart or a cookie that stores the consent choice itself, you do not need consent for them, although you must still explain them in your cookie policy.
Google also requires publishers and advertisers that serve ads or use Google Ads and Google Analytics measurement for users in the EEA, the UK and Switzerland to use a Google-certified CMP or send consent signals through Google Consent Mode v2.
A compliant cookie banner should:
In 2023, the EDPB's cookie banner taskforce agreed a common position on practices that breach the rules, including:
The French CNIL, the UK ICO and other authorities have also written to or fined websites whose banners made rejecting harder than accepting.
A short, clear first layer might read:
We use cookies
We use necessary cookies to make our site work. With your consent, we also use analytics cookies to understand how the site is used and marketing cookies to show you relevant ads, including through our advertising partners. You can accept all, reject all, or choose your preferences. You can change your choice at any time using the cookie icon at the bottom of the page. Read our cookie policy for details.
[Accept all] [Reject all] [Customise]
| Layout | Description | Notes |
|---|---|---|
| Bottom or top bar | A full-width bar at the edge of the screen | Less intrusive; make sure buttons are clear and visible on mobile. |
| Modal or pop-up | A centred box that overlays the page | Most noticeable; must not become a cookie wall. |
| Corner box | A small box in a corner of the screen | Unobtrusive, but can be too easy to overlook on large screens. |
| Two-layer banner | A short first layer with a link to a detailed preference center | The recommended approach: simple first choice, full detail when wanted. |
Whatever layout you choose, keep the first layer short, show Accept and Reject side by side, and match the banner to your brand so visitors recognise it as part of your site.
Learn more about Google Consent Mode, IAB TCF and GPP.
Cookie banners are one of the most actively enforced areas of privacy law. Examples from the French CNIL include:
| Company | Fine | Year | Reason |
|---|---|---|---|
| €100 million | 2020 | Advertising cookies set without prior consent | |
| Amazon | €35 million | 2020 | Advertising cookies set without prior consent |
| €150 million | 2022 | Refusing cookies was harder than accepting them | |
| Facebook (Meta) | €60 million | 2022 | Refusing cookies was harder than accepting them |
| Microsoft (Bing) | €60 million | 2022 | Advertising cookies set without consent and no easy refusal |
| €325 million | 2025 | Ads in Gmail and cookies set when creating a Google account without valid consent | |
| Shein | €150 million | 2025 | Cookies set before consent and refusal not respected |
UniConsent is a Google-certified and IAB Europe-registered CMP that gives you a compliant cookie banner in minutes:
Not sure what your site sets today? Run a free scan with the UniConsent Cookie Checker.
A cookie banner is the pop-up or bar that tells website visitors which cookies and trackers the site uses and asks for their consent before non-essential cookies are set.
In the EU, EEA and UK, yes, if your site uses cookies that are not strictly necessary, such as analytics or advertising cookies. In the US, an opt-in banner is not generally required, but you must offer an opt-out of the sale or sharing of personal data.
In the EU and UK, regulators expect a reject option on the first layer that is as easy to use as the accept option. A banner with only Accept and Settings is widely considered non-compliant.
Generally not. Blocking access unless visitors accept non-essential cookies means consent is not freely given. Some authorities accept limited "consent or pay" models where a genuine alternative is offered.
The GDPR does not set a fixed period, but you should ask again when your purposes or vendors change and refresh consent periodically. Many sites ask again after 6 to 12 months; the CNIL recommends keeping the visitor's choice for 6 months.
The cookie banner is the interactive notice where visitors make their choice. The cookie policy is the detailed page listing each cookie, its purpose, provider and duration. You need both, and the banner should link to the policy.
Yes, in the EU and UK. Google Analytics cookies are not strictly necessary, so they need prior consent. With Google Consent Mode v2, Google tags adjust their behaviour based on the visitor's choice.
Get started to make your website and application compliant for EU GDPR, US CPRA, CA PIPEDA etc
Sign up