Web Design
Cookie Policy Popup Generator: How to Add a Compliant Cookie Banner (GDPR, UK, DPDP, CCPA)
What a compliant cookie popup must do in the EU, UK, India and the US, how Google Consent Mode v2 fits in, and how to add one with a free generator, then test that your tags really wait for consent.
11 min readNew
A cookie policy popup generator gives you two things in minutes: banner code that holds analytics and ad tags until a visitor agrees, and a cookie policy listing the cookies you actually set. To be compliant in 2026, the popup must make rejecting as easy as accepting, offer granular choices and let visitors change their mind later.
I'm Prateek, founder of TechTipsTool. Most sites we audit have a cookie popup. Far fewer have one that works: the banner appears, but Google Analytics and the Meta Pixel have already fired before anyone clicks. This guide covers what the law expects in each market, how Google Consent Mode v2 fits in, and how to check your own site in five minutes. It's practical guidance, not legal advice; for a high-risk business, have a lawyer review the final setup.
What should a cookie policy popup generator give you?
A good generator produces three outputs, not one:
- Banner code that blocks non-essential scripts until consent, with Accept, Reject and Customise options of equal prominence.
- A cookie policy that names each cookie, its provider, purpose and lifetime, based on the tools you actually use.
- A way back in: a "Cookie settings" link visitors can use to change or withdraw consent at any time.
Our free cookie consent generator does all three. You tick the tools on your site (Google Analytics, Meta Pixel, Google Ads, Microsoft Clarity, Hotjar, YouTube embeds and others), and the policy fills in each cookie's details. The banner is plain JavaScript with no dependencies, so it works on WordPress, Shopify, Wix or a custom build.
What a generator can't do is know which scripts your developer added two years ago. Before you generate anything, list every tag on the site. Our free legal page checker is a quick first pass for the pages and links you're missing.
What does the law require from a cookie popup in the EU and UK?
In the EU, two laws work together. Article 5(3) of the ePrivacy Directive requires consent before storing or reading non-essential cookies on a device, and GDPR Articles 4(11) and 7 define what valid consent looks like: freely given, specific, informed, unambiguous, and as easy to withdraw as to give.
Courts and regulators have made that concrete:
- No pre-ticked boxes. The EU Court of Justice ruled in Planet49 (Case C-673/17, 1 October 2019) that a pre-ticked checkbox is not valid cookie consent.
- Reject on the first layer. The EDPB's Cookie Banner Taskforce report (January 2023) records that a vast majority of EU regulators consider a missing "Reject" button on the first layer a breach when "Accept" is there. A "settings" link is not a substitute.
- No dark patterns. Hiding the reject option, making it a faint text link or using deceptive colours are all flagged in the same report.
- No cookie walls in most cases: blocking access unless the visitor accepts tracking is generally not considered freely given consent.
The UK has diverged slightly. The Data (Use and Access) Act 2025 received Royal Assent on 19 June 2025 and added new exemptions to the UK cookie rules (PECR). Analytics used only to produce aggregate statistics to improve your site can run without consent, provided you explain it clearly and offer a simple way to object. Most law-firm commentaries date the commencement of these changes to 5 February 2026; check the ICO's guidance for the current position. Advertising cookies still need consent, and the Act raised PECR fines to UK GDPR levels.
The practical upshot: if your site gets visitors from both the UK and the EU, an opt-in banner for everything non-essential is still the simplest compliant setup.
Do Indian websites need a cookie popup under the DPDP Act?
The DPDP Act 2023 doesn't mention cookies by name, but cookies that identify a visitor (analytics IDs, ad identifiers, logged-in session data) are personal data. Processing them for marketing needs consent unless a "legitimate use" applies, and Section 6(4) requires withdrawing consent to be as easy as giving it.
Timing matters. The DPDP Rules were notified on 14 November 2025 with an 18-month phase-in, so the main notice and consent duties apply from May 2027 (PIB, 2025). Consent manager provisions start earlier, in November 2026. Penalties under the Act go up to ₹250 crore for security failures.
My advice to Indian clients: don't wait for May 2027. An opt-in banner costs nothing with a generator, and retrofitting consent onto years of analytics data later is far harder. That's why our generator defaults to opt-in for India, as well as the EU, UK and Canada.
What about US visitors, CCPA and Global Privacy Control?
The US works the other way round. California's CCPA, as amended by the CPRA, is an opt-out law: you can set cookies by default, but if you "sell" or "share" personal data for cross-context advertising, you must offer a "Do Not Sell or Share My Personal Information" link and honour opt-outs.
The detail many sites miss is Global Privacy Control (GPC), a browser signal that says "don't sell my data". The California Attorney General treats GPC as a valid opt-out request. In the first public CCPA enforcement action, Sephora paid US$1.2 million in August 2022, partly for failing to detect and honour GPC signals.
The CCPA only applies to businesses that cross its thresholds (for example, annual revenue above about US$25 million, adjusted for inflation, or handling data on 100,000+ California residents). An Indian agency site with occasional US visitors usually doesn't. A US e-commerce brand usually does. Our generator's opt-in mode is stricter than the CCPA requires, but it doesn't read GPC signals automatically. If you're covered by the CCPA, add GPC detection or use a consent platform that supports it.
How does Google Consent Mode v2 fit into the popup?
Google Consent Mode v2 is how your banner tells Google tags what a visitor chose. Since March 2024, Google has required it for sites that use Google Ads or GA4 audience and measurement features with visitors from the EEA, and Google applies the same requirement to the UK. Without it, remarketing lists and conversion modelling for those visitors stop working.
It uses four signals: ad_storage, analytics_storage, ad_user_data and ad_personalization. There are two ways to implement it:
| Basic mode | Advanced mode | |
|---|---|---|
| Google tags before consent | Blocked completely | Load, with cookies denied |
| Data sent if visitor rejects | Nothing | Cookieless pings (no cookies, no identifiers) |
| Conversion modelling | General model only | Advertiser-specific modelling |
| Privacy risk | Lowest | Higher; some regulators question cookieless pings |
| Setup effort | Simple | Simple, but needs careful configuration |
Our generator sets all four signals to "denied" by default in opt-in mode and updates them the moment a visitor chooses. If you leave gtag.js loading normally, you're running advanced mode. If you also mark the Google tag as blocked (see below), you get basic mode. My rule of thumb: choose advanced mode once Google Ads spend is meaningful (roughly ₹50,000 or $600 a month and up), where modelled conversions help bidding, and basic mode for everyone else.
Generator, consent platform or custom build: which should you use?
There are three ways to add a cookie popup, and each has a real trade-off.
| Option | Typical cost | Best for | Watch out for |
|---|---|---|---|
| Free generator (paste-in code) | ₹0 | Small business sites with under ~10 trackers | You maintain the cookie list yourself |
| Consent platform (CMP) such as CookieYes or Cookiebot | CookieYes paid plans from US$10 per domain per month; Cookiebot priced by page count | Sites needing automatic scans, consent logs, GPC or IAB TCF | Monthly cost per domain; pageview limits on cheaper plans |
| Enterprise CMP such as OneTrust | Custom quote | Large companies with legal teams and many domains | Cost and setup time |
| Custom-built banner | Developer time | Sites with unusual consent logic | Easy to get legally wrong |
CookieYes pricing is from its own plans page (2026: Basic US$10, Pro US$25 and Ultimate US$55 per domain per month). Check current prices before you buy, as CMP pricing changes often.
When I would not recommend a free generator: if you run IAB TCF ad tech (programmatic display ads), need provable consent logs for an EU regulator, or have dozens of tags managed by different teams. Pay for a CMP in those cases. When I would not recommend a paid CMP: a 10-page service business site with GA4 and one ad pixel. Even an entry-level plan costs around $100–$120 (₹8,500–₹10,000) a year for features you'll never use.
How do you add the popup with our free generator?
It takes about 10 minutes:
- Open the cookie consent generator and tick every tool your site uses.
- Choose opt-in mode (EU, UK, India, Canada) and turn on Google Consent Mode v2 if you use GA4 or Google Ads.
- Set the message, position (bar, corner or centre) and brand colour, then preview it.
- Paste the banner code as high as possible in your
<head>, before Google Tag Manager orgtag.js. - Block every other tracker by changing its script tag to
type="text/plain"withdata-t3-consent="analytics"(or"marketing"or"preferences"). The banner switches it on only after consent. - Add a
Cookie settingslink in your footer so visitors can reopen their choices. - Publish the generated cookie policy, and link it from the banner and footer. Pair it with a privacy policy from our privacy policy generator.
The banner stores the visitor's choice in their browser with a version number. When you add a new tracker, bump the version and everyone is asked again, which is what regulators expect when purposes change.
Which cookie popup mistakes get sites fined?
Regulators have issued large fines for exactly the mistakes that free plugins often make. France's CNIL is the most active:
| Year | Company | Fine | Issue |
|---|---|---|---|
| 2021 | €150 million | Refusing cookies took more clicks than accepting | |
| 2021 | €60 million | Same: no simple way to refuse | |
| 2025 | €325 million | Ad cookies at account creation and ads in Gmail without valid consent | |
| 2025 | Shein | €150 million | Cookies placed before consent and after refusal |
Sources: CNIL decisions announced January 2022 and 3 September 2025.
Small businesses rarely get fines of that size, but the same mistakes appear on most sites we audit:
- Tags firing before the visitor clicks anything
- "Reject" hidden in a second layer while "Accept" sits on the first
- Pre-ticked category boxes in the Customise panel
- No way to change consent after the first choice
- A cookie policy copied from another site that lists cookies you don't use
- A "we use cookies, OK?" notice with no reject option at all
How do you test that your tags really wait for consent?
Don't trust the banner's appearance. Test the behaviour. Run this checklist in a private browser window:
- Before clicking anything, open DevTools → Application → Cookies. You should see no
_ga,_fbpor_gclcookies. - In DevTools → Network, filter for
collectandfacebook. No GA4 or Meta Pixel requests should carry cookies before consent. - In advanced mode, GA4 requests should show
gcs=G100(denied) before consent andgcs=G111(granted) after accepting. - Click Reject, reload, and confirm the trackers still don't fire.
- Click Accept, reload, and confirm they now fire.
- Reopen "Cookie settings", withdraw consent, and confirm tracking stops.
- Check the banner on a phone: all three buttons visible without scrolling.
- Run Google Tag Assistant and confirm consent states update correctly.
If you'd rather we check it for you, our free website audit includes tracking and consent checks alongside SEO and speed.
The bottom line
A cookie policy popup generator is enough for most small and mid-sized websites in 2026, as long as the popup blocks tags before consent, gives Reject the same weight as Accept, and sends Google Consent Mode v2 signals. Pay for a consent platform only when you need consent logs, GPC handling, IAB TCF or many domains.
Generate your banner and cookie policy free with the cookie consent generator. If you'd like us to install it, block every tracker correctly and test it across your site, that's part of our website development service, or you can contact us for a quick quote.
FAQ
Is a free cookie popup generator legally enough?
For most small business sites, yes, if the popup blocks non-essential cookies until consent, offers Reject alongside Accept, and lets visitors change their choice later. The tool doesn't make you compliant on its own: you still need to list every tracker and block each one correctly. Large sites with consent-logging duties should use a paid consent platform.
Do I need a cookie popup if my website is only for Indian visitors?
It's the safest approach. The DPDP Act 2023 treats identifying cookies as personal data, and its consent and notice duties apply in full from May 2027 under the DPDP Rules 2025. Adding an opt-in banner now costs nothing and avoids retrofitting consent later.
What is the difference between a cookie popup and a cookie policy?
The popup is the banner that asks for consent and controls which scripts run. The cookie policy is a page that explains which cookies you use, who sets them, why and for how long. You need both, and the popup should link to the policy.
Does Google Consent Mode v2 replace a cookie popup?
No. Consent Mode only passes the visitor's choice to Google tags; it doesn't ask for consent. You still need a banner that collects the choice and then updates the Consent Mode signals, which is what our generator's code does.
Can I use a cookie wall that blocks the site until visitors accept?
In the EU and UK, generally no. Regulators consider consent forced by a cookie wall not to be freely given, with narrow exceptions. Let visitors reject non-essential cookies and still use the site.

