Cookie Consent Banner Generator
Create a lightweight cookie consent banner with Accept and Reject buttons and a link to your policy. Optionally add Google Consent Mode v2 code so Google tags respect each visitor's choice.
How to add the cookie banner
- Write your message and add your privacy policy link.
- Choose colours and position.
- If you use Google Analytics or Google Ads, keep Consent Mode v2 ticked.
- Paste Step 1 in the head before your Google tag, and Step 2 before the closing body tag. In WordPress, a header and footer code plugin makes this easy.
What Consent Mode v2 does
| Signal | Controls |
|---|---|
| analytics_storage | Analytics cookies (GA4) |
| ad_storage | Advertising cookies |
| ad_user_data | Sending user data to Google for ads |
| ad_personalization | Personalised ads and remarketing |
All four start as denied and switch to granted when the visitor clicks Accept. The choice is saved in the browser so the banner does not show again.
Do Indian websites need a cookie banner?
India’s Digital Personal Data Protection Act, 2023 focuses on notice and consent for personal data. If you have visitors from the EU or UK, stricter cookie consent rules apply. A clear banner with a real reject option is a simple, respectful default. For legal certainty, consult a lawyer.
Related tools
Create a policy with the privacy policy generator, name your tracking events with the GA4 event name generator, and add Meta events with the Meta Pixel event code generator.
More free tools and guides
Practise tools like this on real projects in our digital marketing course in Faridabad, with weekday, weekend and online batches.
See the courseAll free toolsAsk on WhatsAppFrequently Asked Questions
Is this cookie banner generator free?
Yes. It is free with no sign-up and works in your browser.
Will this block Google Analytics until consent?
With Consent Mode v2, Google tags run in a cookieless, limited mode until the visitor accepts. Other scripts need their own consent checks.
Is this banner legally compliant?
It follows good practice, but laws differ by country. It is not legal advice.
Does it slow down my site?
No. It is a few lines of HTML, CSS and JavaScript with no external files.