Serving visitors in the EU? You need to be GDPR-compliant. In this easy guide, you’ll learn how to:
- Enable Google Consent Mode
- Install a cookie consent banner
- Integrate a CMP like OneTrust, CookieBot, or Iubenda
1. Add Google Consent Mode
Paste this just before </head>
in your theme:
// Initialize Consent Mode in denied state
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('consent','default',{
'ad_storage':'denied',
'analytics_storage':'denied'
});
2. Insert a Cookie Banner
In your <body>
, add:
3. Use a CMP (Optional)
For advanced features and logs, integrate:
- OneTrust: Paste their
<script src="https://cdn.cookielaw.org/...otrc.js">
in<head>
. - CookieBot: Paste
<script id="Cookiebot" src="https://consent.cookiebot.com/.../uc.js">
. - Iubenda: Paste
<script src="//cdn.iubenda.com/.../iubenda_cs.js">
.
4. Verify Your Setup
Use Google Tag Assistant to confirm that:
- Consent events fire correctly
- No tracking code runs before consent
Final Thoughts
GDPR compliance is crucial for reaching EU users and avoiding fines. Follow these steps to keep your Blogger site safe and user-friendly.
You May Also Like
Previous Post
« Prev Post
« Prev Post
Next Post
Next Post »
Next Post »
💬 We'd Love to Hear from You!
Your thoughts, feedback, or even a friendly hello help grow this community. Don’t be shy — drop your comment below!