# GDPR Compliant Optional Tracking Button A lightweight, user-friendly JavaScript solution for implementing GDPR-compliant optional tracking on websites. **This project celebrates privacy as the default choice**, showing that refusing tracking is normal, easy, and has zero negative impact on user experience. **🌐 Now with full Norwegian and English language support!** ## Features ### Core Privacy Features - 🔒 **GDPR Compliant by Default**: Minimal tracking until user consents - 🎉 **Privacy-First Design**: Refusing tracking is celebrated with achievements and positive messaging - 🏆 **Privacy Achievements**: Unlock badges for choosing privacy - 📊 **Live Cookie Counter**: See exactly how many cookies are active - 💯 **Privacy Score**: Visual indicator showing your privacy level - 🆚 **Before/After Comparison**: Clear visualization of what changes with tracking ### User Experience - 🌐 **Multilingual Support**: Norwegian and English with instant language switching - 🎨 **Beautiful UI**: Gradient button with hover effects and smooth animations - 📱 **Mobile Responsive**: Works perfectly on all device sizes - ✨ **Equal Choice Design**: "No thanks" is as prominent as "Yes" in consent modal - 📈 **Privacy Statistics**: Shows that 73% of users choose privacy - 🍪 **Cookie Education**: Click cookie counter to learn about each cookie ### Developer Features - ⚡ **Lightweight**: Pure vanilla JavaScript, no dependencies - 🔧 **Easy Integration**: Drop-in solution for any website - 📝 **Ultra-Simple Version**: 30-line implementation in `simple-gdpr.html` - 🍪 **Cookie Management**: Automatic cleanup when tracking is disabled - 📊 **Analytics Ready**: Google Analytics consent mode integration - 💾 **Persistent Preferences**: Language and consent choices remembered between visits ## Demo **🚀 Live Demo:** [https://kode.naiv.no/olemd/gdpr](https://kode.naiv.no/olemd/gdpr) Open `index.html` in your browser to see the button in action! **Language Support:** - Click **EN/NO** toggle in the top-right corner to switch languages - All content translates instantly without page reload - Language preference persists between visits ## Quick Start ### Option 1: Standalone HTML (Recommended for testing) ```html ``` ### Option 2: Minified Snippet (Production ready) ```html
``` ## How It Works ### Default State (GDPR Compliant) - Only essential cookies are allowed - Basic analytics with anonymized IP - No personalization or ad tracking - No cross-site tracking ### Enhanced Tracking (User Opt-in) - Detailed page interactions - User preferences for personalization - Marketing campaign effectiveness - Full Google Analytics features ## Integration Examples ### WordPress ```php // Add to functions.php function add_gdpr_tracking_consent() { // Include the snippet } add_action('wp_footer', 'add_gdpr_tracking_consent'); ``` ### React ```jsx import GDPRTrackingConsent from './GDPRTrackingConsent'; function App() { return (