GS GDPR Consent Manager
GDPR/ePrivacy compliant cookie consent manager with script blocking and YouTube embed management.
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/growskills-dev-team/gdpr-consent/archive/refs/heads/main.zipReadme
GDPR Consent Manager - Smart Detection Update
🚀 Nieuwe Features
1. Slimme Detectie (Smart Detection)
De plugin detecteert nu automatisch of een pagina third-party embeds bevat en toont alleen dan de cookie banner.
Voordelen:
- ✅ Geen onnodige cookie-meldingen voor bezoekers
- ✅ Betere gebruikerservaring
- ✅ Automatische aanpassing aan je content
- ✅ GDPR compliant - vraagt alleen wanneer nodig
Ondersteunde Platforms:
- Video: YouTube, Vimeo, Dailymotion, Wistia, Brightcove
- Social Media: Twitter/X, Instagram, Facebook, TikTok, LinkedIn, Pinterest
- Audio: Spotify, SoundCloud, Apple Music
- Analytics: Google Analytics, Google Tag Manager, Facebook Pixel
- Maps: Google Maps
- WordPress: [embed], [video], [audio] shortcodes
2. Debug Modus voor Developers
Voeg toe aan je wp-config.php:
define('GDPR_CONSENT_DEBUG', true);
Dit zorgt ervoor dat de cookie banner altijd zichtbaar is tijdens ontwikkeling.
3. Verbeterde Admin Interface
- Status indicator (Debug Mode, Smart Detection, Current Page Has Embeds)
- Duidelijke instructies
- Meer voorbeelden
🛠️ Gebruik
Standaard Gebruik (Aanbevolen)
- Ga naar Instellingen > GDPR Consent
- Vink "Only show cookie banner when third-party embeds are detected" aan
- Voeg je tracking scripts toe in de juiste categorieën
- Klik op "Save Changes"
Nu toont de plugin alleen de cookie banner op pagina's met third-party content!
Altijd Tonen (Oude Gedrag)
- Ga naar Instellingen > GDPR Consent
- Laat "Smart Detection" uitgevinkt
- De banner wordt altijd getoond
Development/Testing
- Voeg
define('GDPR_CONSENT_DEBUG', true);toe aanwp-config.php - De banner wordt altijd getoond, ongeacht instellingen
📊 Status Controle
In de admin interface zie je:
- Debug Mode: Enabled/Disabled
- Smart Detection: Enabled/Disabled
- Current Page Has Embeds: Yes/No
🔧 Technische Details
Detectie Logica
De plugin controleert:
- Post/page content op embed URLs
- WordPress shortcodes ([embed], [video], etc.)
- iframe tags met third-party sources
- Script tags met tracking/analytics URLs
Performance
- Minimale impact: detectie gebeurt alleen op pagina load
- Geen extra database queries
- Caching-vriendelijk
🎯 Resultaat
✅ Plugin staat standaard aan
✅ Laadt alleen scripts en banner wanneer nodig
✅ Klant hoeft niets te doen
✅ Developer behoudt controle met debug mode
✅ Betere UX - minder onnodige cookie-meldingen
✅ GDPR compliant - vraagt alleen consent wanneer relevant
📝 Migratiepad
Bestaande installaties:
- Smart Detection is standaard uitgeschakeld
- Bestaand gedrag blijft hetzelfde
- Klanten kunnen optioneel Smart Detection inschakelen
Nieuwe installaties:
- Smart Detection is standaard ingeschakeld
- Optimale gebruikerservaring vanaf dag één
Originele Features
A comprehensive WordPress plugin for GDPR/ePrivacy compliance with cookie consent management, script blocking, and YouTube embed control.
Features
- Automatic Cookie Banner: Displays via
wp_footerwithout shortcodes - Modal Settings: Granular control over cookie categories
- Script Blocking: Prevents analytics/marketing scripts until consent
- YouTube Embed Management: Blocks embeds until consent, shows clickable placeholders
- 6-Month Expiry: Automatically re-prompts for consent after 6 months
- Fully Accessible: ARIA labels, focus traps, keyboard navigation
- WPML Ready: All strings translatable with
__()function - Vanilla JavaScript: No jQuery dependency
- Caching Compatible: Minimal dynamic output
Cookie Categories
- Functional: Always enabled, essential for website operation
- Statistics: Google Analytics, tracking pixels, user behavior analysis
- Marketing: Facebook Pixel, Google Ads, advertising networks
- Embedded Media: YouTube videos, Vimeo, social media embeds
Installation
- Upload the plugin folder to
/wp-content/plugins/ - Activate the plugin through WordPress admin
- Go to Settings > GDPR Consent to configure scripts
Configuration
Adding Scripts
Navigate to Settings > GDPR Consent in your WordPress admin:
- Statistics Scripts: Add Google Analytics, tracking pixels
- Marketing Scripts: Add Facebook Pixel, Google Ads code
- Embedded Media Scripts: Add any scripts required for embeds
Example: Google Analytics (Statistics)
<!-- Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=GA_MEASUREMENT_ID"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'GA_MEASUREMENT_ID');
</script>
Example: Facebook Pixel (Marketing)
<!-- Facebook Pixel -->
<script>
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', 'YOUR_PIXEL_ID');
fbq('track', 'PageView');
</script>
YouTube Embed Handling
The plugin automatically detects YouTube iframes and:
- Replaces them with clickable placeholders if no consent
- Shows placeholders with "Click to load YouTube video" text
- Restores original embeds when consent is given
JavaScript API
The plugin provides a JavaScript API for advanced usage:
// Check if user has consented to a category
if (window.gdprHasConsent('statistics')) {
// Load additional analytics
}
// Get all consent data
const consent = window.gdprGetConsent();
console.log(consent); // { functional: true, statistics: false, ... }
// Show settings modal programmatically
window.gdprShowSettings();
Accessibility Features
- ARIA Labels: All elements properly labeled
- Focus Management: Focus trap in modal, proper focus restoration
- Keyboard Navigation: Full keyboard support (Tab, Enter, Escape)
- Screen Reader Support: Semantic HTML with proper roles
- High Contrast Support: Respects user preferences
Multilingual Support
The plugin is WPML-ready with all strings wrapped in __() functions:
- Text domain:
gs-gdpr-consent - POT file included for translations
- Example Dutch (nl_NL) translation provided
Adding Translations
- Copy
/languages/gs-gdpr-consent.potto your language file - Translate strings using Poedit or similar tools
- Save as
gs-gdpr-consent-{locale}.poin the languages folder
Consent Storage
Consent is stored in browser localStorage with:
- Key:
gdprConsent - Expiry: 6 months (configurable via
CONSENT_EXPIRY_MONTHS) - Format: JSON with categories and timestamp
Caching Compatibility
The plugin is designed to work with caching plugins:
- Static HTML output (no dynamic PHP in frontend)
- JavaScript handles all consent logic
- No admin-ajax calls that bypass cache
Security
- All script inputs sanitized with
wp_kses_post() - Safe script injection using DOM methods
- XSS protection through proper escaping
- No eval() or innerHTML with user content
File Structure
/gs-gdpr-consent/
├── gs-gdpr-consent.php # Main plugin file
├── includes/
│ └── settings-page.php # Admin settings page
├── assets/
│ ├── css/
│ │ └── banner.css # Banner and modal styles
│ └── js/
│ └── banner.js # Consent management logic
└── languages/
├── gs-gdpr-consent.pot # Translation template
└── gs-gdpr-consent-nl_NL.po # Dutch translation
Browser Support
- Modern browsers (ES6+ support required)
- IE11+ (with polyfills if needed)
- Mobile browsers (responsive design)
- Screen readers and assistive technology
Legal Compliance
This plugin helps with GDPR/ePrivacy compliance but:
- You must add proper privacy policy links
- Review scripts to ensure they comply with regulations
- Consider consulting legal experts for full compliance
- Test thoroughly in your specific use case
Changelog
1.0.0
- Initial release
- Full GDPR consent management
- YouTube embed blocking
- Multilingual support
- Accessibility features
- Admin settings interface
Support
For support, customization, or additional features, contact the development team.
Read the full README on GitHub →
Releases
| Tag | Published |
|---|---|
| v.2.2.2 | Jul 23, 2026 |
| v.2.2.1 | Apr 3, 2026 |
| v2.1.6 | Jan 8, 2026 |
| v2.1.5 | Oct 31, 2025 |
| v2.1.4 | Oct 31, 2025 |
| v2.1.3 | Oct 31, 2025 |
| v2.1.2 | Aug 21, 2025 |
| v2.1.1 | Aug 21, 2025 |
| v2.1.0 | Aug 21, 2025 |
| v2.0.9 | Aug 19, 2025 |
| v2.0.8 | Aug 19, 2025 |
| v2.0.7 | Aug 18, 2025 |
| v2.0.6 | Aug 18, 2025 |
| v2.0.5 | Aug 18, 2025 |
| v2.0.4 | Aug 18, 2025 |
| v2.0.3 | Aug 18, 2025 |
| v2.0.2 | Aug 18, 2025 |
| v2.0.1 | Aug 15, 2025 |
| v2.0.0 | Aug 15, 2025 |
| v1.0.3 | Jul 15, 2025 |
| v1.0.2 | Jul 15, 2025 |
| v1.0.1 | Jul 15, 2025 |
These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.