How to Add a Cookie Banner to WordPress, Shopify & Wix
A complete step-by-step guide to implementing GDPR and ePrivacy compliant cookie consent banners on the most popular website platforms. Includes free plugins, apps, and custom code solutions.
Why You Need a Cookie Banner
If your website uses cookies—and almost all websites do—you likely need a cookie consent banner to comply with privacy laws like GDPR (Europe), ePrivacy Directive, CCPA (California), and LGPD (Brazil). These regulations require you to inform visitors about your cookie usage and obtain their consent before placing non-essential cookies on their devices.
A proper cookie banner does more than just display a notice. It must give users genuine control over which cookies they accept, block non-essential cookies until consent is given, and maintain records of user consent. Whether you're running a small blog or a large e-commerce store, implementing a compliant cookie solution protects your business from potential fines and builds trust with your visitors.
When is a Cookie Banner Required?
You need a cookie consent banner if your website uses any non-essential cookies (analytics, marketing, social media) AND you have visitors from the EU/EEA, UK, Brazil, or other regions with cookie laws. Even if you only use Google Analytics, consent is required under GDPR before the tracking script loads.
Adding a Cookie Banner to WordPress
WordPress offers the most flexibility for cookie consent implementation, with dozens of dedicated plugins available. The best approach depends on your technical comfort level and specific compliance needs.
Option 1: Use a Cookie Consent Plugin (Recommended)
For most WordPress users, a dedicated cookie consent plugin is the easiest and most reliable solution. Here are the top-rated options:
CookieYes (GDPR Cookie Consent)
4.9/5Most popular free plugin with 1M+ installs. Supports GDPR, CCPA, and auto cookie scanning.
Complianz
4.9/5Comprehensive solution with cookie scan, consent management, and privacy policy integration.
Cookie Notice & Compliance
4.8/5Lightweight option by developer of Flavor, supports Google Consent Mode v2.
GDPR Cookie Compliance
4.7/5Simple, customizable banner with multiple layout options.
Step-by-Step: Installing CookieYes Plugin
- Log in to your WordPress admin dashboard
- Navigate to Plugins → Add New
- Search for "CookieYes" in the search bar
- Click Install Now on the CookieYes plugin
- After installation, click Activate
- Go to CookieYes → Settings in your dashboard
- Connect to CookieYes (free account) or configure locally
- Run the automatic cookie scan to detect all cookies
- Customize the banner appearance and text
- Enable the banner and test on your live site
Option 2: Add Custom Code
For developers who prefer more control, you can add a custom cookie consent solution using code. You can use our free Cookie Consent Generator to create lightweight, customizable banner code.
Adding Custom Code to WordPress
- Generate your cookie banner code using PolicyGen
- Install the "Insert Headers and Footers" plugin or use your theme's custom code area
- Paste the generated code in the footer section (before </body>)
- Save changes and test your banner
WordPress Cookie Banner Best Practices
- Enable script blocking: Ensure analytics and marketing scripts only load after consent
- Use Google Consent Mode v2: Required for Google Ads and Analytics if targeting EU users
- Keep records: Store consent logs for compliance audits
- Test regularly: Check that cookies are properly blocked before consent
- Cache compatibility: If using a caching plugin, ensure the banner works with cached pages
Adding a Cookie Banner to Shopify
Shopify makes cookie compliance relatively straightforward, though you'll need to use either the built-in EU cookie banner (limited) or a third-party app for full GDPR compliance.
Option 1: Shopify's Built-in Cookie Banner
Shopify includes a basic cookie banner feature, but it has limitations. It primarily serves as a notice rather than a proper consent mechanism with cookie blocking capabilities.
- Go to your Shopify admin panel
- Navigate to Settings → Customer Privacy
- Enable the "Cookie banner" option under "Cookie consent banner for your online store"
- Choose your region settings (EU/EEA, California, etc.)
- Customize the banner text if needed
- Save your changes
Limitation Warning
Shopify's built-in cookie banner may not provide full GDPR compliance as it doesn't automatically block third-party cookies before consent. For stores with EU customers using marketing pixels or analytics, consider a dedicated cookie consent app.
Option 2: Use a Shopify Cookie Consent App (Recommended)
For proper GDPR compliance with cookie blocking and consent management, use a dedicated app:
Pandectes GDPR Compliance
4.9/5Full GDPR/CCPA compliance with Google Consent Mode v2 integration.
Consentmo GDPR Compliance
4.8/5Cookie scanning, consent logging, and multi-language support.
Cookie Consent Bar
4.6/5Free basic option for simple cookie consent needs.
Step-by-Step: Installing a Shopify Cookie App
- Visit the Shopify App Store and search for your chosen app
- Click Add app and authorize the installation
- Open the app from your Shopify admin dashboard
- Run the automatic cookie scan (if available)
- Configure your cookie categories (necessary, analytics, marketing)
- Customize the banner design to match your store theme
- Set up Google Consent Mode v2 integration if using Google services
- Enable the banner and test with a new browser session
Option 3: Custom Code via Theme Editor
For advanced users, you can add custom cookie consent code directly to your Shopify theme:
- Generate your cookie banner code from our Cookie Consent Generator
- Go to Online Store → Themes in Shopify admin
- Click Actions → Edit code on your current theme
- Open the
theme.liquidfile - Paste your cookie banner code just before the
</body>tag - Save the file and preview your store
Adding a Cookie Banner to Wix
Wix provides a built-in cookie consent solution that's suitable for basic compliance needs. For more advanced requirements, you can use third-party apps or embed custom code.
Option 1: Wix's Built-in Cookie Consent Banner
Wix includes a free, native cookie consent feature that's easy to set up:
- Log in to your Wix account and open your site editor
- Click Settings in the left sidebar
- Select Privacy & Cookies
- Under "Cookie Consent Banner," click Set Up
- Choose your banner layout (bar, floating, or corner)
- Customize colors, text, and button labels
- Configure which cookies require consent
- Link to your privacy and cookie policies
- Save and publish your site
| Option | Type | Best For |
|---|---|---|
| Wix Cookie Consent Banner | Native | Built-in free feature in Wix dashboard. Basic but effective. |
| GDPR/CCPA Cookie Consent | App | Third-party app with advanced customization and scanning. |
| Custom HTML Embed | Custom | Add any cookie consent solution using Wix's embed feature. |
Option 2: Wix App Market Solutions
For more advanced cookie management, the Wix App Market offers several GDPR compliance apps. To add one:
- In your Wix editor, click Add Apps in the left sidebar
- Search for "GDPR cookie" or "cookie consent"
- Browse available apps and check their features and reviews
- Click Add to Site on your chosen app
- Configure the app settings according to your needs
- Publish your site to activate the cookie banner
Option 3: Custom HTML Embed
Wix allows you to embed custom HTML, which means you can use any cookie consent solution:
- Generate your cookie banner code from PolicyGen's generator
- In the Wix editor, click Add Elements
- Select Embed Code → Embed HTML
- Click Enter Code and paste your generated code
- Position the HTML embed element appropriately (usually full-width at page bottom)
- Make sure to add it to all pages using Wix's "Add to All Pages" feature
- Publish and test your site
Cookie Categories Explained
A proper cookie consent banner should categorize cookies to give users meaningful choices. Here are the standard categories:
Necessary/Essential Cookies
Required for basic website functionality. Cannot be disabled. Includes session cookies, security cookies, and shopping cart functionality.
Functional/Preference Cookies
Enhance user experience with features like remembering preferences, language settings, and login states. Optional but improve usability.
Analytics/Statistics Cookies
Track visitor behavior to help improve the website. Includes Google Analytics, Hotjar, and similar tools. Requires consent under GDPR.
Marketing/Advertising Cookies
Used for targeted advertising and tracking across sites. Includes Facebook Pixel, Google Ads, and retargeting services. Strictly requires consent.
Google Consent Mode v2
As of March 2024, Google requires websites using Google Ads or Analytics to implement Consent Mode v2 when targeting users in the European Economic Area. This applies regardless of which platform you use.
Consent Mode v2 works by:
- Communicating user consent status to Google services
- Adjusting how Google tags behave based on consent
- Enabling modeling for conversion tracking even without cookies
- Supporting both "Basic" and "Advanced" implementation modes
Most modern cookie consent plugins and apps now include Consent Mode v2 integration. Look for this feature when choosing your solution.
Testing Your Cookie Banner
After implementing your cookie banner, it's crucial to test it properly:
Cookie Banner Testing Checklist
- Open your site in a private/incognito browser window
- Verify the banner appears on first visit
- Check that non-essential cookies are blocked before consent (use browser DevTools → Application → Cookies)
- Test "Accept All" - analytics and marketing should now work
- Test "Reject All" - only essential cookies should be set
- Verify preference center works and saves choices
- Test on mobile devices for responsive behavior
- Confirm consent is remembered on subsequent visits
Common Mistakes to Avoid
- Pre-checked boxes: Under GDPR, non-essential cookie categories must not be pre-selected
- Cookie walls: Blocking access to content unless users accept all cookies is generally not compliant
- Deceptive design: Making "Accept All" more prominent than other options may violate regulations
- Missing "Reject All": GDPR requires rejecting cookies to be as easy as accepting them
- No preference center: Users should be able to modify their choices at any time
- Ignoring consent signals: If a user rejects cookies, analytics and marketing scripts must not fire
- Missing cookie policy: Your cookie banner should link to a detailed cookie policy explaining what cookies you use
Frequently Asked Questions
Do I need a cookie banner if I only use Google Analytics?
Yes. Google Analytics sets cookies that track user behavior, which qualifies as non-essential under GDPR and similar laws. You need to obtain consent before the Analytics script loads. Google also requires Consent Mode v2 implementation for EEA users.
Can I use the same cookie banner for WordPress, Shopify, and Wix?
If you're using a custom code solution (like the one from our generator), you can use the same code across platforms by embedding it appropriately. However, platform-specific plugins/apps often provide better integration and easier management.
How often should users see the cookie banner?
Users should see the banner on their first visit and shouldn't see it again until their consent expires (typically 6-12 months) or they clear their browser data. They should always be able to access their preferences through a link or button on your site.
Is a cookie banner required for US-only websites?
While there's no federal cookie law in the US, California's CCPA/CPRA requires disclosure of data collection practices. Additionally, if you use Google services with ads, Consent Mode is required when your site is accessible to EU users—which includes most websites unless you specifically geoblock.
What's the difference between "implied" and "explicit" consent?
Implied consent assumes acceptance when a user continues browsing. However, GDPR and ePrivacy require explicit consent—a clear affirmative action like clicking "Accept." Simply continuing to use the site is not valid consent under these regulations.
Create Your Cookie Consent Banner
Use our free Cookie Consent Generator to create a customizable, GDPR-compliant cookie banner for any website platform. No coding required.
Generate Cookie BannerRelated Articles
Cookie Consent Requirements by Country
Learn about cookie consent requirements in different jurisdictions including EU, UK, USA, and more.
GDPR Compliance Checklist 2026
A comprehensive checklist to ensure your website meets all GDPR requirements.
Privacy Policy Best Practices
Essential tips for writing a privacy policy that's legally compliant and user-friendly.