How to Add Cookie Consent to WordPress (2026)
Add GDPR-compliant cookie consent to WordPress. Compare CookieYes, Complianz, and WPML Cookie Law. Learn consent modes and Google Analytics compliance.
How to Add Cookie Consent to WordPress
GDPR (EU), CCPA (California), and similar privacy laws require websites to obtain user consent before placing non-essential cookies. Failing to comply risks fines and loss of advertising access. Adding proper cookie consent to WordPress is straightforward with the right plugin.
What Requires Cookie Consent?
- Analytics cookies: Google Analytics, Meta Pixel, Hotjar
- Marketing/advertising cookies: Retargeting pixels, ad networks
- Functional cookies: Live chat, embedded social media
- Strictly necessary cookies: Session cookies, shopping cart — these do NOT require consent
Recommended Plugins
CookieYes (free/paid): Most popular option with 1+ million installs. Automatic cookie scanning, geo-targeting (show banner only to EU/California visitors), and Google Consent Mode v2 integration. Free plan covers most small sites.
Complianz (free/paid): Excellent for complex compliance needs. Generates a cookie policy automatically. Strong support for regional variations.
CookieYes Setup
- Install CookieYes and activate
- The plugin automatically scans your site for cookies and categorizes them
- Customize the consent banner appearance to match your branding
- Enable Google Consent Mode v2 in the Analytics section — required for GA4 compliance
- Set your cookie policy page (plugin generates one automatically)
- Enable the banner and test in an incognito window
Google Consent Mode v2
If you use Google Analytics or Google Ads, you must implement Consent Mode v2 to remain compliant and avoid losing conversion tracking. CookieYes and Complianz both support this automatically when integrated with GA4.
Testing Compliance
Use the cookiebot.com/en/gdpr-compliance-test to scan your site for cookies being set before consent is given. Review results and configure your consent plugin to block pre-consent cookie loading.
Ready to get started? Try SiteICO free.
Start FreeStart building with SiteICO
Deploy your WordPress site in under 1 second. Follow our guides to get the most out of the platform.
No credit card required.