Skip to content

Klaro Cookie & Consent Management

I need to... Guide Summary
Understand what consent management is and when to use it What is Consent Management Use consent management when your Drupal site loads external resources (scripts, iframes, images) that may collect visitor data or set cookies. Required for GDPR, ePrivacy Directive, and similar privacy regulations.
Ensure GDPR and ePrivacy compliance Legal Compliance Requirements Understand legal requirements before implementing consent management to ensure your configuration meets regulatory standards for GDPR, ePrivacy Directive, and other privacy laws.
Choose between Silent, Notice, or Modal consent modes Consent Mode Selection Choose consent mode based on your site's regulatory requirements and user experience priorities. Configure at **Administration > Configuration > User interface > Klaro!
Install Klaro module and library Installation Methods Install Klaro module and klaro-js JavaScript library before configuration. Choose installation method based on your Drupal project's dependency management approach.
Configure third-party services (analytics, tracking) Service Configuration Configure a service when you need to control external resources (scripts, iframes, images) that collect data or set cookies. Each third-party integration requires a service definition.
Group services by category (purposes) Purpose Management Create purposes to group related services into categories. Purposes appear as sections in the consent modal and allow users to enable/disable entire groups at once.
Set cookie expiration and domain scope Storage Settings Configure how Klaro stores user consent decisions. Storage method and duration affect user experience, browser compatibility, and compliance requirements.
Customize colors, positioning, and branding Styling and UI Customization Customize Klaro's appearance to match your site's branding, position elements, and control HTML rendering in descriptions.
Translate consent UI for multi-language sites Translation and Localization Translate Klaro's consent interface for multi-language Drupal sites. Requires Configuration Translation module enabled.
Automatically block external scripts before consent Automatic Resource Attribution Enable automatic detection and blocking of external resources without manually adding HTML attributes. Critical for preventing pre-consent tracking.
Add privacy settings link to menu Menu Integration Provide users a way to modify consent preferences after initial decision. GDPR requires the ability to withdraw consent at any time.
Exclude admin pages or previews from consent manager URL Pattern Exclusions Disable Klaro on specific URL patterns where consent management isn't needed (admin pages, previews) or interferes with functionality.
Fix consent modal or script blocking issues Troubleshooting Diagnose and resolve common Klaro configuration issues, script blocking failures, and modal rendering problems.
Prevent XSS vulnerabilities and secure configuration Security Best Practices Secure Klaro configuration to prevent XSS vulnerabilities, injection attacks, and unauthorized consent manipulation.
Optimize for page load performance Performance Optimization Optimize Klaro for fast page load times, minimal render blocking, and efficient resource management.
Extend Klaro with custom code or event subscribers Development Standards Follow Drupal and Klaro development best practices when extending, theming, or integrating Klaro into custom code.