Dr. Sophie Laurent
Head of Data Protection
Under the ePrivacy Directive and GDPR, you must obtain explicit consent before storing or accessing non-essential cookies on a user's device. This means no third-party analytics, marketing pixels, or tracking scripts should load before the user has given clear, informed consent.
⚠Pre-loading trackers before consent is obtained is one of the most common GDPR violations and an instant compliance fail during audits.
Using Google Analytics requires special attention. Set default consent to "denied" using gtag consent mode, only activate analytics storage after user opt-in, and implement server-side anonymization of IP addresses.
// Correct: Set default consent BEFORE loading GA
gtag('consent', 'default', {
'analytics_storage': 'denied',
'ad_storage': 'denied',
'ad_user_data': 'denied',
'ad_personalization': 'denied'
});
// Only update after explicit user consent
function onConsentGranted() {
gtag('consent', 'update', {
'analytics_storage': 'granted'
});
}Our scanner checks your website for cookie consent compliance including pre-consent loading, banner visibility, opt-out mechanisms, and consent storage. Run a free scan to identify gaps.