Mandatly Knowledge Base
How to Create a Cookie Banner?
Creating a cookie banner is a critical step toward ensuring your website is compliant with global data privacy regulations such as GDPR, CCPA/CPRA, LGPD, and others. A properly implemented cookie banner informs users about the use of cookies and obtains valid cookie consent before any tracking begins.
This guide walks you through the essential steps to create, customize, and deploy a compliant cookie banner that meets modern cookie compliance standards.
8 Easy Steps to Create a Cookie Banner:
1. Know the Rules:
Cookie banners are required to:
- Inform users about cookies and tracking tools
- Explain what data you collect and why
- Offer clear options to accept, reject, or customize cookies
- Log and store user consent preferences
Want more detail? Check out our full guide: What Does a Cookie Banner Have to Include?
2. Pick the Right Banner Type:
Choose a format that fits your audience and region:
- Opt-in: Ask before setting cookies (e.g., Europe)
- Opt-out: Let users opt out (e.g., California)
- Hybrid: Use geolocation to apply the right type automatically
Learn more about banner formats: Types of Cookie Consent Banners
Tip: Mandatly automatically applies the right type using geolocation!
3. Use a Cookie Compliance Tool:
A reliable platform like Mandatly helps you:
- Detect all cookies on your site automatically
- Categorize cookies into types (Essential, Analytics, Marketing, etc.)
- Stay compliant with global laws
- Customize banners to match your brand
Explore features: Mandatly Cookie Compliance Solution
4. Design Your Banner:
Make sure your banner is:
- Visually clear and easy to use on all devices
- Accessible (good contrast, readable fonts)
- Includes buttons like Accept, Reject, and Customize
Browse examples: Cookie Consent Banner Design for Your Website
5. Customize the Content:
Your cookie banner content should:
- List the types of cookies and their purposes
- Provide links to your cookie policy and privacy notice
- Let users manage individual cookie categories
Step-by-step help:: Customize Your Banner Content with Mandatly
6. Add the Banner to Your Website:
You can install the banner by:
- Adding a script to your website’s
<head>tag - Using Google Tag Manager
- Installing via your CMS (like WordPress or Shopify)
For this, click on the link: Step-by-Step Implementation Guide of Mandatly
7. Monitor & Stay Updated:
After launching your banner:
- Track user consent data
- Watch for drops in analytics traffic
- Re-scan regularly for new cookies
- Stay updated with privacy laws
Learn how to stay ahead: How to Prevent Drop in Traffic After Cookie Banner with Mandatly
8. Test, Update, and Stay Compliant:
Privacy laws and browser behavior change often; your cookie banner should keep up.
Make sure to:
- Test banner functionality across all devices and browsers
- Re-scan your site regularly for new cookies from plugins or tools
- Review changes in global privacy laws to stay compliant
👉 Manage all updates easily with Mandatly’s Cookie Consent Manager.