No cookie banner = GDPR fine up to €20 million. AdSense can ban you for EU traffic without consent.
In this tutorial, you'll add a cookie consent banner to Blogger. Follow along and you'll comply with GDPR, CCPA, and AdSense rules in 2025.
Step 1: Why Blogger Needs Cookie Consent Banner 2025
If you use AdSense, Analytics, or comments, you set cookies. EU law requires consent.
- GDPR law: EU visitors must click "Accept" before cookies load
- AdSense policy: Google requires consent banner for personalized ads
- CCPA law: California users need "Do Not Sell My Data" option
- Fine risk: No banner = €20M fine or AdSense account disabled
Image: Google AdSense warning about missing cookie consent
Step 2: Add Free Cookie Consent Code to Blogger
Use Osano or CookieYes free plan. 100% compliant.
- Go to cookieyes.com → Sign up free → Add your domain
- Customize banner: Color, text, button = "Accept All"
- Compliance → Turn on GDPR + CCPA → Copy installation code
- Blogger → Theme → Edit HTML → Ctrl+F → Search
</head> - Paste code ABOVE
</head>→ Save theme
Image: CookieYes dashboard with embed code
Step 3: Manual Cookie Banner HTML for Blogger
No third-party tool? Use this simple code. Paste above </body> in theme.
<style>
#cookie-banner {
position: fixed; bottom: 0; left: 0; right: 0;
background: #222; color: #fff; padding: 15px;
text-align: center; z-index: 9999; font-size: 14px;
}
#cookie-banner a {color: #4da6ff; text-decoration: underline;}
#cookie-banner button {
background: #1a73e8; color: white; border: none;
padding: 8px 16px; margin-left: 10px; border-radius: 4px;
cursor: pointer;
}
</style>
<div id="cookie-banner" style="display:none;">
We use cookies to improve your experience and show personalized ads.
<a href="/p/privacy-policy.html">Privacy Policy</a>
<button onclick="acceptCookies()">Accept</button>
</div>
<script>
function acceptCookies() {
localStorage.setItem('cookieConsent', 'true');
document.getElementById('cookie-banner').style.display = 'none';
}
if (!localStorage.getItem('cookieConsent')) {
document.getElementById('cookie-banner').style.display = 'block';
}
</script>
Step 4: Link Cookie Banner to Privacy Policy
Banner must link to Privacy Policy page or it's invalid.
| Requirement | What to Do | Why |
| Privacy Policy link | Banner text must link to /p/privacy-policy.html | GDPR Article 13 |
| Accept button | Must say "Accept" or "Agree", not "OK" | Legal clarity |
| Reject option | EU needs "Reject" or "Manage" button | GDPR compliance |
| Block cookies | AdSense/Analytics load only after Accept | Advanced: Use CookieYes auto-block |
Step 5: Test Cookie Banner + AdSense Compliance
- Test 1: Open blog in Incognito → Banner shows at bottom → Click Accept → Banner hides
- Test 2: Clear cache → Reopen → Banner should NOT show again
- Test 3: Use VPN set to Germany → Banner must show for EU users
- AdSense check: AdSense → Privacy & messaging → GDPR → Must show "Compliant"
- After setup: Add cookie policy section to Privacy Policy page
Bad practice to avoid: Using "We use cookies" popup with no Accept button. Not legal. Must have user action.
Important: Free CookieYes = 25k pageviews/month. Upgrade if traffic grows. For AdSense, banner must load BEFORE ads. Check AdSense → Brand safety → EU user consent. If red, fix banner. Update banner text yearly.
0 Comments