Time: 15 min to read · Serves: Your website · The key step: Identify which laws apply to your audience before choosing a consent tool.
Cookie banner compliance means getting clear, informed consent from visitors before storing or accessing cookies on their devices. This page explains the main laws, what a compliant banner must include, and how to handle common situations like analytics and advertising.
Decide Which Laws Apply to Your Site
Start by figuring out which regulations you must follow. The two most common are the GDPR (General Data Protection Regulation) for visitors in the European Economic Area (EEA) and the UK GDPR, and the ePrivacy Directive, which is implemented in each EU country. If you have visitors from California, the CCPA (California Consumer Privacy Act) and its amendment CPRA also apply. Other US states have similar laws, like Virginia’s VCDPA and Colorado’s CPA.
You need to comply if you target or serve people in those regions, even if your business is elsewhere. Check your analytics to see where your traffic comes from. If you sell goods or services to EU/UK residents, or if you show ads to them, you likely fall under GDPR and ePrivacy.
For a small blog with mostly US traffic, you might only need CCPA compliance. For a global e-commerce site, you need both. When in doubt, consult a lawyer who specializes in privacy law.
Know What a Compliant Banner Must Include
A compliant banner is not just a pop-up. It must meet specific requirements depending on the law.
Under GDPR and ePrivacy
You need to get consent before setting any non-essential cookies. That means:
- Active opt-in: Pre-ticked boxes are not allowed. The visitor must take a clear action, like clicking “Accept” or “Allow.”
- Granular choices: Let users choose which categories of cookies they accept (e.g., necessary, analytics, marketing).
- Easy to reject: A “Reject” or “Decline” button must be as easy to find as the “Accept” button.
- Clear language: Explain what cookies are used for in plain, simple language. Avoid legal jargon.
- No dark patterns: Don’t make it harder to reject than to accept. No confusing double negatives or misleading colors.
- Link to privacy policy: Include a link to your full privacy policy that details each cookie and its purpose.
Under CCPA/CPRA
For California residents, the rules are different. You must provide a “Do Not Sell or Share My Personal Information” link, and you must honor opt-out requests. The banner should explain that you sell or share personal information, and give a clear way to opt out. You do not need to get opt-in consent before setting cookies, but you must allow users to opt out of the sale or sharing of their data.
Some states also require you to recognize the Global Privacy Control (GPC) signal. This is a browser setting that automatically tells sites you do not want your data sold or shared. You must honor it as a valid opt-out request.
Choose the Right Consent Management Platform
You could build your own banner, but a Consent Management Platform (CMP) is usually easier and more reliable. A CMP helps you:
- Detect visitors’ location and apply the right law.
- Block cookies until consent is given.
- Store consent records (required by GDPR).
- Provide a preferences center where users can change their choices.
Popular CMPs include Cookiebot, OneTrust, and Termly. When choosing one, consider:
- Pricing: Many have free tiers for small sites, but check the limits on page views.
- Customization: Can you match the banner to your site’s design?
- Compliance features: Does it support both GDPR and CCPA? Does it handle GPC?
- Ease of integration: Look for plugins for WordPress, Shopify, or other platforms.
If you have a simple site with only essential cookies (like a login cookie), you might not need a CMP. But if you use Google Analytics, advertising pixels, or embedded videos, you likely do.
Set Up Your Banner Correctly
Here is a step-by-step approach to configuring your banner:
- List all cookies: Use a tool like a browser extension or your CMP’s scanner to identify every cookie your site sets. Note its name, purpose, and lifespan.
- Categorize them: Group cookies into “Strictly Necessary,” “Performance/Analytics,” “Functional,” and “Targeting/Marketing.” Only necessary cookies are exempt from consent.
- Set up consent blocking: Ensure that analytics and marketing scripts do not load until the user has consented. This is called “prior consent.”
- Write clear descriptions: For each category, explain what the cookies do. For example: “Analytics cookies help us understand how visitors use our site, so we can improve it.”
- Place the banner: Show it on first visit, before any non-essential cookies are set. Do not show it again unless the user clears their cookies or you change your policy.
- Test it: Open your site in an incognito window and check that no non-essential cookies are set before you click “Accept.” Then test the “Reject” button to ensure it works.
Remember that the banner must be visible on all pages, not just the homepage. Use a footer link to your privacy policy and a “Cookie Settings” link so users can change their preferences later.
Handle Common Cookie Types Correctly
Analytics (e.g., Google Analytics)
Under GDPR, analytics cookies are not strictly necessary, so you need consent. Many sites use a “consent mode” that allows Google to use cookieless pings until consent is given. This is a good compromise. Under CCPA, analytics cookies are not considered “sale” if you do not share the data with third parties for monetary value, but you still need to disclose them.
Advertising (e.g., Google Ads, Facebook Pixel)
These are clearly non-essential and require consent under GDPR. Under CCPA, they are considered “sharing” or “selling” personal information, so you must provide an opt-out. Your banner should treat advertising cookies as a separate category.
Strictly Necessary (e.g., session cookies, security cookies)
These are exempt from consent because they are essential for the site to function. You do not need to include them in your consent request, but you should list them in your privacy policy. Do not use this category for anything else.
Keep Records and Stay Updated
GDPR requires you to keep proof of consent. Your CMP should store a timestamp, the user’s choice, and the version of your policy. This is your protection if a regulator asks.
Laws change, and so do cookie behaviors. Review your cookie list every few months. Use your CMP’s scanner to re-scan your site. Update your privacy policy whenever you add a new script or change a cookie’s purpose.
If you receive a request from a user to delete their data (a “right to be forgotten”), you must honor it. Your CMP should help you manage such requests.
What Happens If You Don’t Comply?
Penalties can be severe. Under GDPR, fines can reach up to €20 million or 4% of your global annual revenue, whichever is higher. Under CCPA, fines are up to $7,500 per intentional violation. But most small sites won’t face maximum fines. Still, a complaint can trigger an investigation, and you may be forced to change your practices.
More importantly, non-compliance erodes visitor trust. A clear, respectful banner shows you care about privacy.
Store Consent Records Properly
Your CMP should store consent records securely. Keep them for at least as long as the relevant law requires. For GDPR, there is no fixed time, but a common practice is to keep them for 5 years. For CCPA, keep records of opt-out requests for at least 24 months. Check your CMP’s data retention settings.
If you ever need to prove consent, you can show the record of a specific user’s action. That is why it is crucial to store the exact version of your privacy policy that was shown at the time of consent.
Test Your Banner Like a User
After you set up your banner, run these checks:
- Open your site in a private browsing window. Do you see the banner?
- Click “Reject.” Are any non-essential cookies set? Use your browser’s developer tools to inspect cookies.
- Click “Accept.” Do analytics and ads load?
- Go to your preferences center. Can you change your choice? Does it work?
- Try using the Global Privacy Control in a browser that supports it. Does your site honor it?
If you find issues, fix them before you go live. A broken banner is worse than no banner.
What to Do If You Use a Third-Party Service
If you use a cookie banner service, you still have responsibility. You must configure it correctly. Read the service’s documentation. If you are unsure, contact their support.
Some services offer a “scan” feature that automatically finds cookies. Use that, but also manually review the list. Some cookies are set by third-party scripts, and your scanner might miss them.
Remember that the banner is only part of compliance. You also need a comprehensive privacy policy that lists all cookies, explains your data practices, and tells users how to contact you.
Keep Your Privacy Policy Up to Date
Your privacy policy should be a separate page, linked from your banner and your site footer. It must include:
- What personal data you collect (including cookies).
- Why you collect it.
- Who you share it with.
- How users can exercise their rights (access, deletion, opt-out).
- Your contact information.
Update it whenever you change your cookie usage. Keep a version history so you can show what was in effect at any time.
Common Mistakes to Avoid
- Pre-ticked boxes: Not allowed under GDPR.
- No reject button: Must be as easy as accept.
- Setting cookies before consent: Non-essential cookies must wait.
- Ignoring CCPA: If you have California visitors, you need the opt-out link.
- Not honoring GPC: Some states require it.
- Using vague language: “We use cookies” is not enough.
Fix these and you are on the right track.
Ingredients
- 1 website
- 1 list of all cookies (use a scanner)
- 1 consent management platform (optional but recommended)
- 1 privacy policy page
Instructions
- Identify your audience and applicable laws (GDPR, ePrivacy, CCPA, etc.).
- Scan your site for cookies and categorize them.
- Choose a CMP or build a custom banner.
- Configure the banner with clear language, granular choices, and a reject button.
- Set up consent blocking so non-essential cookies load only after consent.
- Add a link to your privacy policy and a preferences center.
- Test the banner in incognito mode.
- Store consent records and review your setup regularly.
Related
- Cookie and Cream Spread Recipe
- Sugar Cookie Recipe That Does Not Spread
- Thanksgiving Casserole Dishes: 12 Sides and Mains
Safe minimum internal temperatures follow USDA FSIS; raw-fish guidance follows the U.S. FDA. See our food safety notes.
Spotted an error? Tell us and we will correct it (corrections policy).