Cookie consent banners: what the law actually asks for
You need a consent banner if your site loads analytics, ad pixels or embeds for visitors whose law requires it. What EU, India, UAE and Saudi rules ask.
By Sohail Hussain21 November 20266 min read
You need a cookie consent banner if your website sets cookies or similar trackers that are not strictly necessary, such as analytics, advertising pixels, chat widgets and embedded videos, and some of your visitors are in places whose law requires consent before those load. That is firmly the case for visitors in the EU, EEA and UK. India's DPDP Act 2023 requires notice and consent for processing personal data, with most obligations applying from May 2027. The UAE and Saudi data protection laws make consent the default basis for processing too. A site with no analytics, no pixels and no third-party embeds may need no banner at all.
This is a general guide to what the rules ask for, written by a web studio, not a law firm. Rules change and depend on your business, so check what applies to you with a lawyer before relying on it.
What counts as a cookie that needs consent?
Laws care about what a technology does, not what it is called. Cookies, local storage, tracking pixels and device fingerprinting are all treated alike.
| Category | Examples | Consent needed in the EU? |
|---|---|---|
| Strictly necessary | Login sessions, shopping basket, load balancing, security tokens, the cookie that stores the consent choice itself | No |
| Preferences | Remembered language or region | Usually yes, unless the visitor asked for it |
| Analytics | Google Analytics, Microsoft Clarity, heatmap tools | Yes, with narrow exceptions some regulators allow |
| Advertising | Meta Pixel, Google Ads tags, LinkedIn Insight Tag | Yes |
| Embedded third-party content | YouTube videos, Google Maps, chat widgets, social feeds | Yes, if they set cookies or read the device |
The last row is the one people miss. A YouTube embed or a chat widget can set cookies before anyone clicks on it. YouTube's privacy-enhanced mode reduces what it stores; a static map image linking to Google Maps avoids the question entirely.
Start by finding out what your site actually loads, because it is rarely what anyone remembers. Marketing adds a pixel, a developer adds a chat widget, and the list drifts. On sites under our website care and maintenance, we check which scripts run every quarter for exactly that reason.
What does EU law ask for?
Two laws work together. The ePrivacy Directive requires consent before storing or reading anything on a visitor's device, unless it is strictly necessary for a service the visitor asked for. The GDPR sets what valid consent looks like: freely given, specific, informed and unambiguous, given by a clear action. In practice, EU regulators expect:
- Nothing non-essential loads before a choice. Analytics and pixels wait for consent.
- Reject is as easy as accept. The European Data Protection Board's cookie banner taskforce report treats a missing reject option on the first layer, and design tricks that push people towards accept, as problems.
- No pre-ticked boxes. The EU's top court ruled in 2019 that pre-ticked consent is not valid.
- Consent can be withdrawn as easily as it was given, usually through a link in the footer that reopens the banner.
- A record of consent, so you can show when and to what a visitor agreed.
The GDPR can apply to a business outside the EU if it offers goods or services to people in the EU or monitors their behaviour. A company in India or the Gulf with European customers should assume these rules apply to those visitors. The UK has similar rules under its own law.
As of October 2026, EU institutions are negotiating changes to the cookie rules as part of a wider simplification package. Until any change is adopted and takes effect, the rules above stand.
What does India's DPDP Act ask for?
The Digital Personal Data Protection Act, 2023 does not mention cookies. It covers digital personal data, and an analytics identifier or ad pixel linked to a person can be personal data. The DPDP Rules were notified in November 2025 with a phased start: consent manager registration from November 2026, and most obligations, including notice and consent, from around May 2027. MeitY's data protection page has the Act and Rules.
When those obligations apply, consent must be free, specific, informed, unconditional and unambiguous, given by a clear affirmative action, and limited to the data needed for the stated purpose. The notice must describe the data and purpose in plain language, be available in English or any of the 22 languages in the Eighth Schedule of the Constitution, and explain how to withdraw consent and complain to the Data Protection Board. Withdrawing must be as easy as consenting. The Act also applies to businesses outside India that offer goods or services to people in India. Penalties for the most serious failures reach ₹250 crore.
In practice, a banner that meets the EU standard above, plus a clear privacy notice, is a good basis for India too. Ask your lawyer about language versions and whether any of your processing falls under the Act's "legitimate uses".
What about the UAE and Saudi Arabia?
UAE. The federal Personal Data Protection Law, Federal Decree-Law No. 45 of 2021, makes consent the main basis for processing, with listed exceptions, and requires it to be specific, clear and given by an affirmative action that can be withdrawn. There is no separate cookie rule, and as of October 2026 reports conflict on whether its executive regulations have been issued. Businesses in the DIFC and ADGM free zones fall under those zones' own data protection laws instead, which are closer to the GDPR.
Saudi Arabia. The Personal Data Protection Law has been in force since September 2023, with enforcement by SDAIA from September 2024. Consent is the default basis, with exceptions that include legitimate interest in some cases, and a privacy policy must be available before data is collected.
For both, the safe default is the same as the EU: ask before loading analytics and advertising tags, and explain clearly what each one does. Take local advice if you process data at scale or handle sensitive data such as health information.
What does a good banner look like in practice?
It is a technical problem as much as a legal one, because the banner has to control what loads. A correct setup:
- Loads only strictly necessary scripts until the visitor chooses.
- Shows Accept and Reject with equal weight on the first screen, plus a way to choose by category.
- Links to a cookie or privacy policy that names the tools used. The privacy policy generator gives you a template to review with your lawyer.
- Stores the choice, with a date, and asks again after a set period or when the list of tools changes.
- Offers a footer link to change the choice later.
- Passes the choice to Google's tags through Consent Mode, which Google requires for its advertising features for visitors in the EEA and UK.
The cookie consent banner generator produces the HTML, CSS and JavaScript for a banner that blocks analytics until a visitor agrees. GA4 for small businesses covers the analytics side.
The banner also goes out of date when the list of tools changes, so recheck it whenever a new script is added, not only once a year.
Can you avoid needing a banner at all?
Often, more than people expect. Remove the advertising pixels you are not using for campaigns. Replace embedded maps with a static image and a link. Use privacy-enhanced video embeds. Some EU regulators, such as France's CNIL, exempt narrowly configured audience measurement from consent, and several privacy-focused analytics tools are built to fit those conditions.
For many B2B company sites, the honest answer is that the ad pixels were added years ago, nobody runs ads any more, and deleting them removes most of the problem. Start there. Then decide whether the analytics you keep is worth a banner. The rest of the site's routine, including a check of what loads, is in the website maintenance guide.
Was this guide useful?