GDPR Compliant Analytics: How to Track Users Legally in Europe
Learn how to implement analytics that comply with GDPR while still providing actionable insights for your business.
Wilmer
Co-founder & CEO

You need analytics to run your business. But you also need to comply with GDPR. For many e-commerce companies, this feels like an impossible choice: either sacrifice data quality or risk regulatory action. Fines can reach 4% of global annual revenue or 20 million euros, whichever is higher.
Update, September 2026: the cost of getting this wrong keeps rising. Cumulative GDPR fines passed 7.1 billion euros across more than 2,800 enforcement actions, with 1.2 billion euros issued in 2025 alone, the fastest single year since enforcement began. Cookie consent and analytics loaded without consent remain the most common findings, and the EDPB has scheduled a coordinated enforcement action on transparency and information obligations for the second half of 2026.
The good news is that GDPR-compliant analytics is achievable. You can track what matters for your business while respecting user privacy and staying on the right side of European law. This guide explains how.
What GDPR Actually Requires
The General Data Protection Regulation isn't anti-analytics. It's pro-transparency and pro-control. Understanding the core principles helps you implement compliant tracking.
Lawful Basis for Processing
You need a legal basis to process personal data. For analytics, the relevant options are consent (user explicitly agrees to tracking), legitimate interest (you have a business reason that doesn't override user rights), or contract necessity (tracking required to fulfill a service).
Most analytics requires consent in practice. Legitimate interest arguments for marketing analytics typically don't hold up under scrutiny, especially after recent rulings against Google Analytics in several EU countries.
Data Subject Rights
Users have rights over their data: access (see what you've collected), rectification (correct errors), erasure (delete their data), portability (export their data), and objection (stop processing).
Your analytics setup must support these rights. Can you find and delete a specific user's data? Can you export their browsing history? If not, you have a compliance gap.
Data Minimization
Collect only what you need. If you don't need precise geolocation, don't collect it. If you don't need device fingerprints, don't create them. GDPR favors minimalism.
This principle actually simplifies analytics. Focus on the metrics that matter rather than collecting everything "just in case."
Enforcement in 2025 and 2026
The pattern in the enforcement data is that regulators have moved from asking whether a banner exists to testing whether consent actually works. France's CNIL issued a 325 million euro decision against Google and a 150 million euro decision against Shein in September 2025, both centered on cookies set before or without valid consent, and it continues to focus on ad tech and US-hosted analytics tools. Italy's Garante updated its cookie guidelines to flag Google Analytics 4 loaded without consent as a compliance risk. Dark patterns are treated as violations in their own right: buried opt-outs, pre-ticked boxes, and consent framed as the only way past a wall all trigger action. For an analytics setup the practical test is simple. If the analytics script loads before the visitor has said yes, the banner is decoration.
That is also why the architecture of your analytics tool matters more than its privacy policy. A tool that runs without cookies and treats consent as a server-side gate, the way Arktis refuses a session recording chunk unless the visitor's consent flag is true, removes the failure mode regulators are fining, rather than asking you to configure around it. Our guide to session recording and GDPR covers the recording-specific rules, including the CNIL's 2026 draft recommendation.
The Google Analytics Problem
Google Analytics, particularly Universal Analytics and GA4, has faced serious challenges in Europe. Data protection authorities in Austria, France, Italy, and other countries have ruled that standard GA implementations violate GDPR.
The core issues include data transfers to the US (which lacks adequate privacy protection under EU law), the inability to fully anonymize data before transfer, and Google's use of data for its own purposes beyond your analytics.
While Google has made adjustments, many European businesses are moving to alternatives that keep data within the EU and don't share it with third parties.
Building Compliant Analytics
First-Party Data Collection
The foundation of GDPR-compliant analytics is first-party data collection. You collect data directly from users on your own infrastructure, without sharing it with third parties.
This means hosting your analytics solution on European servers (or your own), not sending raw data to external services, and maintaining full control over data access and retention.
Arktis follows this model, keeping all data on European infrastructure under your control.
Proper Consent Implementation
Consent must be freely given (not required for service access), specific (for defined purposes), informed (clear explanation of what you're tracking), and unambiguous (explicit action, not pre-checked boxes).
Cookie banners that use dark patterns - making "accept all" prominent while hiding reject options - don't meet these standards. Regulators are increasingly targeting manipulative consent flows.
Good consent asks clearly, offers genuine choice, and remembers user preferences. Users who decline should still get full site functionality.
IP Anonymization
IP addresses are personal data under GDPR. To collect them without consent, anonymize before storage by removing the last octet (e.g., 192.168.1.xxx). Better yet, don't store IP addresses at all - use them only for real-time geolocation, then discard.
True anonymization happens before data reaches persistent storage. "Anonymizing later" isn't compliant because you've already processed the personal data.
Cookie-Free Tracking Options
Cookies require consent under ePrivacy rules (which work alongside GDPR). But you can track basic analytics without cookies using server-side session tracking, browser fingerprinting alternatives that don't store identifiers, first-party JavaScript without persistent storage, and aggregated metrics that don't identify individuals.
Cookie-free approaches have trade-offs. You lose some precision in user identification and session tracking. But you gain consent-free operation and simpler compliance.
Consent Management Implementation
Technical Requirements
Your consent management platform needs to block tracking scripts until consent is given, record consent with timestamp and version, allow users to withdraw consent easily, respect browser Do Not Track signals (recommended), and integrate with your analytics to enforce consent status.
Many consent tools install a cookie to remember preferences. This is generally acceptable under the "strictly necessary" exemption since it's required to respect user choice.
Consent Rates and Data Quality
Expect 30-60% consent rates with good UX design. Some traffic will always decline tracking. Your analytics needs to work with partial data.
Strategies to maximize consent include clear explanation of benefits to users, avoiding dark patterns, making consent choices easy to change, and showing you respect the choice either way.
Remember that coercing consent violates GDPR. Users who decline should still access your site fully.
Data Retention and Deletion
Setting Retention Periods
GDPR requires that data be kept only as long as necessary. For analytics, this typically means raw event data with 13-25 months retention to capture year-over-year comparisons, aggregated reports retained indefinitely (no personal data), and deleted or anonymized data beyond retention period.
Document your retention rationale. Why do you need 25 months versus 13? The answer should relate to business necessity, not "because we might want it someday."
Implementing Automatic Deletion
Configure analytics to automatically purge data beyond retention limits. Manual deletion processes fail - automate this.
Test that deletion actually works. Run a user data request on old data to verify it's truly gone.
Handling Data Subject Requests
Users will request their data or ask for deletion. Prepare processes to identify all data associated with a user, export it in readable format, and delete it from all systems including backups.
Response time is 30 days under GDPR. Build systems that can respond quickly.
Cross-Border Considerations
EU Data Residency
Keep European user data in European data centers. Data transfers to the US remain legally problematic despite various frameworks attempting to bridge the gap.
Verify where your analytics provider stores data. "Cloud" often means US servers by default.
Binding Corporate Rules and SCCs
If you must transfer data outside the EU, use approved mechanisms like Standard Contractual Clauses (SCCs). These are legal agreements that impose GDPR-equivalent protections on the data importer.
However, for analytics, keeping data in the EU is simpler than managing international transfer compliance.
Practical Implementation Steps
Step 1: Audit Current Setup
What are you currently collecting? Where is data stored? Who has access? Map your data flows before making changes.
Step 2: Choose Compliant Tools
Select analytics platforms that offer EU data residency, first-party data collection, proper consent integration, and data deletion capabilities.
Step 3: Implement Consent Management
Deploy a consent banner that meets GDPR standards. Test that tracking actually stops when consent is declined.
Step 4: Configure Data Minimization
Review what you're collecting. Remove unnecessary data points. Anonymize where possible.
Step 5: Set Up Retention and Deletion
Configure automatic data purging. Build processes for user data requests.
Step 6: Document Everything
Create records of processing activities (required under GDPR). Document your legal basis, retention periods, and security measures.
Getting Started
GDPR compliance isn't a one-time project - it's an ongoing practice. Start with the highest-risk areas: cookie consent, data storage location, and user data rights. Build compliant foundations, then refine.
Arktis provides GDPR-compliant analytics with EU data residency, proper consent management, and built-in data subject rights support.
Sources
2. European Data Protection Board, "Guidelines and Recommendations"
3. NOYB, "101 Complaints on EU-US Data Transfers"
4. CNIL, "Google Analytics and Data Transfers to the United States"
5. UniConsent, GDPR Enforcement and Fines 2026: Business Categories, Top Cases, and Country
6. Pandectes, EU Cookie Compliance in 2026: A Complete Guide for Businesses
7. Nixon Digital, GDPR Enforcement Trends 2026: What the Fines Data Tells Us
Frequently Asked Questions
Is Google Analytics legal under GDPR?
Standard Google Analytics implementations have been ruled non-compliant by data protection authorities in several EU countries due to data transfers to the US. While Google has made adjustments, many European businesses are choosing EU-hosted alternatives that don't transfer data internationally.
Do I need consent for all website analytics?
You need consent for any analytics that process personal data or use cookies. However, you can track some aggregate metrics without consent using cookie-free, privacy-preserving methods that don't identify individuals. The line depends on what data you collect and how.
What counts as personal data in analytics?
Personal data includes anything that can identify a person directly or indirectly: IP addresses, device identifiers, browser fingerprints, location data, and user IDs. Even pseudonymous data (like cookie IDs) is personal data if it can be linked back to individuals.
How long can I keep analytics data under GDPR?
As long as necessary for your stated purpose, but no longer. Most analytics purposes are satisfied with 13-25 months of data. Document why you need your chosen retention period. Aggregate data without personal identifiers can be kept indefinitely.
What happens if I'm not GDPR compliant?
Fines can reach 4 percent of global annual revenue or 20 million euros, whichever is higher, and the numbers are not theoretical: cumulative GDPR fines passed 7.1 billion euros by 2026, with 1.2 billion euros issued in 2025 alone. Cookie consent and analytics loaded without consent are among the most common findings, as the CNIL's 325 million euro Google decision in September 2025 showed. Beyond fines, regulators can order you to stop processing, which for an analytics setup means losing your data mid-quarter.
Free tools for this topic
From the blog
Try Arktis free for 7 days
Attribution tracking, session recordings, and AI automation in one platform. Set up in 2 minutes, free for 7 days.
Start 7-day free trialWritten by
Wilmer
Co-founder & CEO
Wilmer leads product strategy at Arktis, focusing on privacy-first analytics and attribution tracking for e-commerce brands.