Analytics Compliance Without Consent Banner

Jun 14, 2025

What can you track with web analytics, without requiring a cookie consent banner and/or privacy policy, and maintain compliance with GDPR and CCPA?

Introduction: Navigating the Privacy-First Economy

The digital landscape is undergoing a fundamental transformation, driven by a confluence of regulatory pressure and shifting consumer expectations regarding data privacy. The era of ubiquitous, consentless tracking, epitomized by the third-party cookie, is rapidly drawing to a close. Regulations like the General Data Protection Regulation (GDPR) in Europe and the California Consumer Privacy Act (CCPA) have established stringent requirements for how organizations collect and process user data, imposing significant penalties for non-compliance. This regulatory environment, coupled with a growing public awareness of "surveillance capitalism," has created a significant market opportunity for technologies that prioritize privacy by design.
This new economy demands a paradigm shift from data maximization to data minimization. For web analytics, this means moving away from tools that collect vast amounts of personally identifiable information towards solutions that provide actionable insights while respecting user anonymity. The value proposition of a modern analytics platform is no longer just the data it provides, but the legal confidence and trust it instills. A successful platform in this climate must function as a "Compliance-as-a-Service" offering, where the core product is not merely traffic metrics, but demonstrable legal peace of mind for website administrators.
This document serves as the foundational legal and architectural blueprint for a privacy-first, cookieless web analytics platform. It deconstructs the complex and often overlapping requirements of the GDPR, the ePrivacy Directive, and the CCPA to establish a unified, "highest-common-denominator" compliance model. This model is then translated into two distinct and technically specified operational modes: a completely anonymous mode that falls outside the scope of privacy law, and a richer, pseudonymised mode built upon the defensible legal basis of "Legitimate Interest." The final section provides a direct, actionable implementation plan intended for the engineering team, ensuring that the principles of privacy-by-design are embedded into the core of the product architecture.

Section 1: The Regulatory Gauntlet: A Unified Compliance Model for GDPR, ePrivacy, and CCPA

To build a platform that offers its customers true legal confidence, it is not sufficient to comply with a single regulation. The architecture must be resilient to the strictest interpretations across all relevant legal frameworks. This section establishes the non-negotiable legal principles derived from GDPR, the ePrivacy Directive, and CCPA that will dictate the platform's design, creating a robust and defensible compliance posture.

1.1 Defining "Personal Data": The Foundation of All Privacy Obligations

The cornerstone of all data protection law is the definition of "personal data" or "personal information." The scope of this definition determines when the regulations apply. A conservative and comprehensive interpretation is essential for a product whose primary value is legal assurance.
The GDPR provides a famously expansive definition, stating that 'personal data' means any information relating to an identified or identifiable natural person. An individual is considered "identifiable" if they can be singled out, "directly or indirectly, in particular by reference to an identifier such as a name, an identification number, location data, an online identifier". This explicitly includes data points common in web analytics, such as IP addresses and cookie IDs, which are categorized as "online identifiers".
The CCPA casts an even wider net. Its definition of "personal information" includes any information that "identifies, relates to, describes, is reasonably capable of being associated with, or could reasonably be linked, directly or indirectly, with a particular consumer or household". The CCPA explicitly lists identifiers such as IP addresses, geolocation data, and internet activity like browsing and search history. Crucially, it also includes "inferences drawn" from any other personal information to create a profile about a consumer's preferences and characteristics.
A critical concept underpinning these definitions is the "singling out" doctrine, articulated in Recital 26 of the GDPR. It clarifies that to determine whether a person is identifiable, one should account for "all the means reasonably likely to be used... to identify the natural person directly or indirectly". This means that data does not need to contain a name or email address to be considered personal. A combination of several seemingly innocuous data points can, in aggregate, become personal data if their combined uniqueness allows for an individual to be distinguished from a group. This is often referred to as the "mosaic effect." For instance, collecting a specific browser version, a precise screen resolution, a list of installed browser plugins, and a timezone can create a highly unique "device fingerprint". While each piece of information in isolation may be low-risk, their combination constitutes a powerful online identifier and is therefore personal data.
For the purpose of building a maximally safe analytics platform, the unified definition of personal data must be the most conservative one. The platform will treat any data point, or combination of data points, as "personal data" if it could be used to reasonably single out an individual, their specific device, or their household. This approach acknowledges that the primary legal risk often lies not in collecting a single problematic data point, but in collecting a set of data points whose cumulative entropy is high enough to create a unique or near-unique signature. This principle dictates that the platform's data collection policy cannot be a simple checklist of allowed fields; it must be a holistic assessment of the total information gathered per visitor event. Consequently, techniques like "binning" screen sizes into categories and "truncating" user-agent strings are not merely best practices but are legal necessities to reduce the identifiability of the overall dataset.

1.2 The ePrivacy Directive: The True Gatekeeper of "No Banner"

While the GDPR governs the processing of personal data, the ePrivacy Directive (often called the "cookie law") governs a specific action: the storing of information on, or the gaining of access to information already stored in, a user's terminal equipment (e.g., computer or smartphone). This distinction is of paramount importance for any service aiming to operate without a consent banner.
Article 5(3) of the Directive establishes the core rule: this action is only allowed with the user's prior, informed consent. The rule is technology-neutral, applying not only to traditional HTTP cookies but to any equivalent technology, including localStorage, sessionStorage, tracking pixels, and scripts that actively probe the user's device for fingerprinting data.
For this specific action of accessing a user's device, the ePrivacy Directive's consent requirement takes precedence over the GDPR's more flexible lawful bases. An organization cannot rely on "Legitimate Interest" under the GDPR to justify setting a non-essential cookie or running a fingerprinting script; explicit, opt-in consent is the only valid legal basis. This is a frequent point of confusion, but it is a settled matter of law.
The only way to legally bypass this consent requirement is to fall under one of two narrow exemptions. The action must be either:

  1. For the sole purpose of carrying out the transmission of a communication over an electronic communications network.
  2. "Strictly necessary" in order to provide an information society service "explicitly requested by the subscriber or user".

Regulators have consistently interpreted the "strictly necessary" exemption very narrowly. A classic example of a strictly necessary cookie is one that remembers the items in a user's shopping cart as they navigate an e-commerce site. Conversely, cookies and similar technologies used for analytics, audience measurement, and advertising are explicitly and repeatedly classified as not strictly necessary by data protection authorities (DPAs) like the UK's Information Commissioner's Office (ICO).
The critical takeaway is that the ePrivacy Directive is an action-based law, not a data-based one. Its rules are triggered by the act of accessing the user's device, regardless of whether the data collected is personal or anonymous. This means that even if the goal is to collect 100% anonymous data, if the method used involves storing or reading non-essential information from the user's device, a consent banner is legally required. This single principle dictates the entire client-side architecture of a "no banner" analytics tool. The tracking script must be a "zero-footprint" script. It cannot use cookies, localStorage, sessionStorage for non-essential purposes, or any other form of persistent client-side storage. Furthermore, it cannot engage in active device fingerprinting, such as probing for installed fonts or using canvas rendering to generate an identifier. The only data it can permissibly collect without triggering ePrivacy consent are data points that are transmitted automatically by the browser as part of a standard HTTP request (e.g., IP address, User-Agent header) or are available via non-persistent JavaScript APIs that do not access stored information (e.g., location.pathname, document.referrer).

1.3 The Analytics Exemption: A Perilous but Potential Safe Harbor (The CNIL Model)

While the ePrivacy Directive sets the strict EU-wide rule, the law allows for some national variation in its implementation. This has led a few national regulators to carve out specific, narrow exemptions for analytics tools that meet stringent privacy-preserving conditions. The most well-documented and influential of these comes from France's Commission Nationale de l'Informatique et des Libertés (CNIL).
The CNIL's guidance provides a limited exemption from the ePrivacy consent requirement for analytics trackers whose purpose is strictly limited to measuring the audience of a site or app on behalf of the publisher. This exemption is not a blanket pass for all analytics and is contingent upon meeting a cumulative list of strict conditions :

  1. Strict Purpose Limitation: The data collection must be for the sole purpose of audience measurement (e.g., performance measurement, detection of navigation problems, analysis of content) and for the exclusive benefit of the website publisher.
  2. No Cross-Referencing or Third-Party Transmission: The collected data must not be cross-referenced with other data sources (like CRM data) or transmitted to third parties. The data from different websites using the tool must be processed separately.
  3. IP Address Anonymization: At least the last octet of the visitor's IP address must be truncated or anonymized before storage.
  4. Limited Data and Identifier Lifespan: If a cookie or other identifier is used under this exemption, its lifespan must not exceed 13 months. The raw data collected must not be retained for more than 25 months.
  5. Limited Scope of Tracking: The tracking must be confined to a single website or application. Cross-site tracking is prohibited.
  6. No Precise Geolocation: Geolocation derived from the IP address must not be more precise than the city or postal code level.
  7. User Information and Opt-Out: Users must still be informed of the processing (e.g., in a privacy policy) and be provided with an easy way to object or opt-out.

It is crucial to contrast this with the position of stricter DPAs. The UK's ICO, for example, offers no such analytics exemption in its current guidance. The ICO's position is that analytics is not "strictly necessary" for the user-requested service and therefore always requires consent.
The platform's strategy should be to leverage the CNIL model as the architectural foundation for its more advanced tracking mode. By engineering a mode that meticulously adheres to the CNIL's stringent conditions, the platform can offer its customers a legally defensible position in at least one major EU jurisdiction. This can be argued as a reasonable, good-faith interpretation of the spirit of the law in other jurisdictions, particularly given the privacy-preserving measures implemented. However, it must be communicated to customers that this approach is not entirely without risk, as a DPA in a country without such an explicit exemption could still take a stricter view.

Section 2: Architecting for Compliance: The Two Modes of Operation

Building on the legal principles established in the previous section, the platform's architecture will be bifurcated into two distinct operational modes. Each mode is designed to provide a specific level of legal assurance and data richness, translating abstract regulatory requirements into concrete product features and technical specifications.

2.1 Mode 1: The Anonymity Standard (No Banner, No Policy)

This mode is designed to offer the highest possible level of legal certainty. Its objective is to operate completely outside the purview of data privacy regulations like GDPR and CCPA by ensuring that no personal data is ever processed or stored.
Guiding Principle: Anonymised at the Point of Collection. To obviate the need for a privacy policy and any associated compliance obligations, the data collected must be rendered irreversibly anonymous. This is a higher standard than pseudonymisation. According to GDPR Recital 26, the regulation "does not... concern the processing of... anonymous information, namely information which does not relate to an identified or identifiable natural person or to personal data rendered anonymous in such a manner that the data subject is not or no longer identifiable". For data to be truly anonymous, re-identification must be impossible by any reasonably likely means. Pseudonymisation, which involves replacing identifiers with a code, is insufficient because the data can still be attributed to a specific person with additional information; therefore, pseudonymised data remains personal data. Mode 1 must achieve true, irreversible anonymisation.
Technical Architecture: The architecture for Mode 1 is predicated on transient, in-memory processing and immediate data aggregation.

  1. A "zero-footprint" client-side script collects only the bare minimum of information automatically made available by the browser during a web request. It does not use cookies, localStorage, or any device-accessing techniques.
  2. The server receives the request, which includes the visitor's full IP address and User-Agent string in the HTTP headers.
  3. In-Memory Processing: The server uses these raw identifiers transiently in memory. The IP address is used to perform a one-time lookup to derive the visitor's country. The User-Agent string is used to derive low-entropy data points: the general device class (e.g., 'Desktop'), the OS family (e.g., 'Windows'), and the browser family (e.g., 'Chrome').
  4. Immediate Discard: Immediately after these derivations are made, the raw IP address and the full User-Agent string are completely discarded. They are never written to any log file, database, or any form of persistent storage.
  5. Storage: Only the derived, aggregated, and now non-personal data points are written to the database for analytics. The stored record contains no information that could be used to single out an individual.

What CAN be tracked in Mode 1:

  • Page URL: The path of the page being viewed (e.g., /pricing).
  • Referrer Domain: The referring source, scrubbed to the domain level only (e.g., google.com, twitter.com).
  • UTM Parameters: Standard campaign tracking parameters (utm_source, utm_medium, etc.).
  • Country: The two-letter ISO country code derived from the IP address.
  • Device Type: A general category: 'Desktop', 'Mobile', or 'Tablet'.
  • Browser Family: The name of the browser: 'Chrome', 'Safari', 'Firefox', etc.
  • OS Family: The name of the operating system: 'Windows', 'macOS', 'Android', etc.

What CANNOT be tracked in Mode 1:

  • Unique Visitors: Without any form of persistent or semi-persistent identifier, it is impossible to distinguish a new visitor from a returning one. Every pageview is treated as an independent event.
  • Sessions: While a sessionStorage ID is technically possible without triggering ePrivacy consent, it adds complexity for minimal value in a truly anonymous context where unique visitors cannot be tracked. Simplicity and absolute certainty are the goals.
  • Granular Technical Data: City-level geolocation, specific browser or OS versions (e.g., 'Chrome 108.0.5359.124'), and screen dimensions are all forbidden as they increase the risk of re-identification via the mosaic effect.

Legal Justification: The legal basis for this mode is straightforward: the data privacy laws do not apply. Because no personal data is ever stored or filed, the GDPR and CCPA are not triggered for the stored dataset. Furthermore, because the client-side script does not store information on or access information from the user's device, the consent requirement of the ePrivacy Directive is not engaged. Mode 1 is the digital equivalent of a simple, anonymous door counter at a physical store—it counts entries but knows nothing about the individuals passing through.

2.2 Mode 2: The Legitimate Interest Standard (No Banner, Yes Policy)

This mode is designed for customers who require richer analytics, including the ability to count unique visitors, while still avoiding the need for a consent banner. It operates on a more complex legal footing, acknowledging the processing of personal data but justifying it under a specific legal basis.
Guiding Principle: Privacy-Preserving Pseudonymous Analytics. Mode 2 acknowledges that it processes personal data. However, it is architected to do so without requiring user consent. Instead, it relies on the "Legitimate Interest" lawful basis provided under GDPR Article 6(1)(f). This is only possible because the platform continues to adhere to the core principle of avoiding ePrivacy consent triggers—that is, still no cookies and no active device fingerprinting. The collection of personal data is limited to what is sent by the browser by default.
The Legitimate Interests Assessment (LIA): A Non-Negotiable Prerequisite. The use of Legitimate Interest is not a free pass; it requires the data controller (the website owner using the platform) to conduct and document a Legitimate Interests Assessment (LIA). The platform must provide its customers with clear guidance and ideally a template for this assessment. The LIA is a three-part test :

  1. Purpose Test: Identify the legitimate interest. For example: "To analyze website traffic trends, understand user engagement with content, and identify technical issues in order to improve the website's functionality and user experience." This is a legitimate commercial interest.
  2. Necessity Test: Demonstrate that the processing is necessary to achieve that purpose. For example: "Counting unique visitors is necessary to understand audience growth versus repeat engagement. Understanding user environments (browser, OS, screen size) is necessary to optimize the site design for the majority of users. Session tracking is necessary to analyze user journeys and identify points of friction."
  3. Balancing Test: This is the most critical part. The controller must balance their legitimate interests against the interests, rights, and freedoms of the data subject. The argument that the controller's interests are not overridden rests on several key mitigating factors built into the platform:
    • The data collected is minimized and pseudonymised at the point of collection.
    • The purpose is strictly limited to first-party aggregate statistics; it is not used for behavioral advertising, invasive profiling, or sharing with third parties.
    • No tracking occurs across different websites.
    • The privacy impact is low, as the user might "reasonably expect" a website owner to conduct basic analytics to improve their service.
    • Crucially, the user is given clear information in a privacy policy and has an absolute and easily accessible right to object (opt-out), which the platform must facilitate.

Technical Architecture & Additional Data Points: Mode 2's architecture is carefully designed to align with the strict conditions of the CNIL analytics exemption, providing a strong, defensible position.

  • Unique Visitor Counting (The Daily Salted Hash): This is the most significant and highest-risk feature of Mode 2. The process is as follows: on the server, a unique hash is generated for each incoming request using the formula: daily_visitor_id = HASH(visitor_ip_address + visitor_user_agent + website_id + daily_salt).
    • The daily_salt is a secret, cryptographically secure random string that is generated once every 24 hours and then irretrievably deleted. The old salt is never archived.
    • Legal Status: This generated hash is pseudonymous personal data. It is not anonymous because it can be used to "single out" a visitor's pageviews within a 24-hour window on a single website. The use of this technique is a calculated risk. While competitors like Plausible and Fathom employ this method, creating a market precedent, it is essential to understand its legal nature. The technique does not render the data anonymous; rather, the significant privacy mitigation (the 24-hour reset) is what makes the processing of this personal data potentially justifiable under a Legitimate Interest balancing test. The platform must be transparent with its customers about this, framing it as "privacy-preserving unique visitor counting" and not "anonymous tracking."
  • Geolocation: Can be expanded to include Country and Region/State (or equivalent first-level administrative division). City-level geolocation is still considered too granular and poses an unnecessary risk to the balancing test.
  • Screen Dimensions: To mitigate fingerprinting risk, exact pixel dimensions (e.g., 1924x1081) must not be stored. Instead, they should be "binned" into predefined categorical breakpoints (e.g., 'xs: <576px', 'sm: 576-768px', 'md: 768-992px', etc.). Storing the categorical label significantly reduces the data's entropy.
  • Referrer URL: Can be expanded to include the full path of the referring URL, but all query string parameters must be scrubbed to prevent the accidental ingestion of PII.
  • Browser/OS Version: To further reduce fingerprinting risk, only the major version of the browser and OS should be stored (e.g., Chrome 108), not the full, specific version string.

By implementing these measures, Mode 2 provides significantly more utility than Mode 1 while remaining within a defensible legal framework that does not require a consent banner. The onus is on the platform to provide the tools and on the customer to maintain a compliant privacy policy and honor opt-out requests.

Section 3: The Implementation Blueprint: A Developer's Guide

This section provides the direct, actionable specifications for the engineering team. It translates the legal and architectural principles from the preceding sections into a concrete implementation plan, removing ambiguity and ensuring that the final product is compliant by design.

3.1 Master Data Point Compliance Matrix

The following table serves as the single source of truth for data handling. It dictates how every potential data point must be processed, stored, and/or discarded in each of the platform's operational modes. Adherence to this matrix is critical for maintaining the legal integrity of the product.

Data PointRaw Data ExampleMode 1 Implementation (The Anonymity Standard)Mode 2 Implementation (The Legitimate Interest Standard)Legal Rationale & Notes
IP Address198.51.100.1USE & DISCARD. Use transiently in-memory for country lookup, then immediately discard. Must never be logged or stored.PSEUDONYMISE & DISCARD. Use transiently in-memory for geo-lookup and as an input for the daily salted hash. Must discard the raw IP immediately after use.A raw IP address is an "online identifier" and constitutes personal data under both GDPR and CCPA. Discarding it is the cornerstone of Mode 1's anonymity. Hashing is a form of pseudonymisation, not anonymisation; the result is still personal data.
User AgentMozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36...PARSE, AGGREGATE, DISCARD. Parse in-memory for Browser, OS, and Device Type families (e.g., 'Chrome', 'macOS', 'Desktop'). Store only these low-entropy strings. Discard the full UA string.PARSE, TRUNCATE, STORE. Parse for families and major versions (e.g., 'Chrome 108', 'macOS 13'). Store these truncated strings. Discard the full UA string.A full User-Agent string is a high-entropy vector for device fingerprinting and can contribute to "singling out" a user. Aggregation and truncation are essential data minimisation techniques required by GDPR and are aligned with the principles of the CNIL exemption model.
Screen Dimensions1920x1080STRICTLY FORBIDDEN. The combination with other data points is too identifying.BIN & STORE. Convert exact dimensions into predefined categorical bins based on common responsive design breakpoints (e.g., 'xs', 'sm', 'md', 'lg', 'xl'). Store only the bin label, not the raw numbers.Reduces the entropy of the data to mitigate fingerprinting risk. Exact screen dimensions are a key component of unique device fingerprints.
Geolocation(Derived from IP)COUNTRY ONLY. Store only the two-letter ISO country code (e.g., 'FR', 'DE').COUNTRY & REGION. Store the country code and the first-level administrative division (e.g., state, province, region). City-level data is too granular and high-risk.Location data is explicitly personal data. Granularity significantly increases identifiability. The CNIL exemption allows up to postal code level, but for a global product, limiting to region is a more conservative and defensible posture.
Referrer URLhttps://www.google.com/search?q=analyticsDOMAIN ONLY. Extract and store only the effective top-level domain + 1 (e.g., google.com). The full path and all query parameters must be scrubbed.PATH ONLY. Extract and store the origin and pathname (e.g., https://www.example.com/blog/article-name). All query parameters must be scrubbed.Query parameters frequently contain PII or session identifiers, posing a significant compliance risk. Aggressive scrubbing is a critical data minimisation measure.
Session ID(from sessionStorage)NOT RECOMMENDED. While technically compliant with ePrivacy, it provides little value in a fully anonymous context and adds unnecessary complexity. The goal is simplicity and absolute legal certainty.PERMITTED. Generate and store a random string in sessionStorage. This identifier is ephemeral, scoped to the browser tab/session, and is automatically cleared by the browser.sessionStorage does not persist across sessions and is not considered equivalent to a cookie under the ePrivacy Directive. It can be considered "strictly necessary" for the purpose of analyzing a single user journey within one session.
Unique User ID(cross-session)STRICTLY FORBIDDEN. This is the clearest violation of the "no banner" principle.Daily Salted Hash ONLY. Implement as HASH(IP + UA + SiteID + DailySalt). This is the only defensible method for consentless unique visitor counting. See section 2.2 for a full analysis of the risks.Any persistent or stable identifier requires ePrivacy consent. The daily salted hash is a high-risk but marketable implementation of pseudonymisation that relies on its 24-hour lifespan as a key mitigating factor.
Custom Event Properties{'category': 'books', 'author': 'jane\_doe'}PERMITTED (with strict validation). The system must filter incoming properties against a deny-list of keys that are likely to contain PII (e.g., 'email', 'name', 'user_id', 'address'). The customer bears ultimate responsibility, but the platform must provide technical safeguards.PERMITTED (with strict validation). Same requirements as Mode 1. The customer must be explicitly warned in the documentation and their privacy policy that they are responsible for not sending PII in custom properties.Under GDPR, both the data controller (the customer) and the data processor (the platform) have compliance obligations. The processor must implement technical measures to help prevent data breaches and unauthorized processing.

3.2 Server-Side Processing Logic: A Decision Flow

The following pseudocode outlines the server-side logic for handling an incoming analytics event. This logic must be executed for every request to ensure that raw personal data is handled transiently and that the correct data points are stored based on the customer's selected compliance mode.

Function handle_analytics_request(request, site_config):  
  // 1. Extract raw data from request headers and body  
  raw_ip = request.headers['x-forwarded-for'] or request.remote_addr  
  raw_ua = request.headers['user-agent']  
  payload = request.body

  // 2. Initialize enriched data object with common, safe fields  
  enriched_data = {  
    site_id: site_config.id,  
    timestamp: new Date().toISOString(),  
    event_name: payload.event,  
    pathname: payload.pathname,  
    utm_source: payload.utm_source,  
    //... other UTM fields  
  }

  // 3. Perform transient, in-memory enrichment using raw data  
  geo_data = geo_lookup_from_ip(raw_ip)  
  parsed_ua = parse_user_agent(raw_ua)

  // 4. Apply mode-specific logic  
  // The raw_ip and raw_ua are only used within this block and are never stored.

  if site_config.mode == 'MODE_2_LEGITIMATE_INTEREST':  
    // --- Mode 2: Legitimate Interest Standard ---  
    enriched_data.country = geo_data.country_code  
    enriched_data.region = geo_data.region_code  
      
    enriched_data.device_type = parsed_ua.device_type  
    enriched_data.os_family = parsed_ua.os_family  
    enriched_data.os_version_major = parsed_ua.os_major_version  
    enriched_data.browser_family = parsed_ua.browser_family  
    enriched_data.browser_version_major = parsed_ua.browser_major_version

    enriched_data.screen_bin = bin_screen_dimensions(payload.screen_width, payload.screen_height)  
    enriched_data.referrer_path = extract_origin_and_path(payload.referrer)  
    enriched_data.session_id = payload.session_id

    // Generate the pseudonymised daily visitor ID  
    daily_salt = get_daily_salt() // CRITICAL: Fetches the secret, daily-rotated salt  
    visitor_signature = raw_ip + raw_ua + site_config.id + daily_salt  
    enriched_data.daily_visitor_id = sha256(visitor_signature)

  else: // Default to Mode 1 for maximum safety  
    // --- Mode 1: Anonymity Standard ---  
    enriched_data.country = geo_data.country_code  
      
    enriched_data.device_type = parsed_ua.device_type  
    enriched_data.os_family = parsed_ua.os_family  
    enriched_data.browser_family = parsed_ua.browser_family

    enriched_data.referrer_domain = extract_domain(payload.referrer)

  // 5. Filter and store the final data object  
  // The raw_ip and raw_ua variables are now out of scope and will be garbage collected.  
  // They were never written to disk or any persistent log.  
  final_data = filter_for_allowed_fields(enriched_data, site_config.mode)  
  save_to_database(final_data)

3.3 Critical Pseudocode and Policy Templates

Daily Salt Management: The security and integrity of the daily salted hash mechanism depend entirely on the proper management of the salt. This process must be automated, secure, and auditable.

# This function should be executed by a secure, isolated, and reliable  
# scheduler (e.g., cron job) precisely at 00:00:00 UTC every day.  
def rotate_daily_salt():  
  # Generate a new, cryptographically secure random string.  
  new_salt = generate_secure_random_string(64)  
    
  # Store the new salt in a fast-access, volatile cache (e.g., Redis, Memcached).  
  # The Time-To-Live (TTL) ensures it is automatically purged after 24 hours  
  # even if the rotation job fails on the next day.  
  cache.set('analytics_daily_salt', new_salt, ttl=86400) # 86400 seconds = 24 hours  
    
  # CRITICAL: The old salt is now overwritten or has expired. There is no  
  # history of past salts, making retrospective re-identification of visitors  
  # from previous days computationally infeasible.

# This function is called by the request handler.  
def get_daily_salt():  
  salt = cache.get('analytics_daily_salt')  
  if not salt:  
    # This is a fallback mechanism in case the cache is empty or has been cleared.  
    # It should trigger a high-priority alert to system administrators, as it  
    # indicates a potential issue with the scheduled rotation job.  
    log_critical_alert("Daily salt not found in cache. Generating emergency salt.")  
    rotate_daily_salt()  
    return cache.get('analytics_daily_salt')  
  return salt

Template Privacy Policy Clause for Mode 2 Customers: Customers using Mode 2 must update their privacy policy to inform users about the data processing. Providing a clear, legally sound template is a crucial part of the service.
Website Analytics:
To understand how visitors interact with our website and to continuously improve our service, we use [Your Analytics Platform Name], a privacy-focused web analytics service. [Your Platform Name] provides us with aggregated statistical data and is designed to respect your privacy.
We process this information on the legal basis of our Legitimate Interest (as per Article 6(1)(f) of the GDPR) to monitor and enhance our website and services. We have conducted a Legitimate Interest Assessment and have concluded that our interest in this processing is not overridden by your rights and freedoms, particularly given the privacy-preserving measures we have taken.
The data we process includes:

  • Usage Data: The pages you visit on our site, the website that referred you to us, and the duration of your visit.
  • Technical Data (Pseudonymised): Your device type, operating system, browser, and screen size are collected in an aggregated, non-identifying way (e.g., 'Desktop, Windows, Chrome, Large'). Your location is determined at the country and region level only.
  • Temporary Unique Visitor ID: To distinguish between unique and repeat visits within a 24-hour period, a temporary, pseudonymised identifier is created from your IP address, user agent, and a daily changing secret key (a "salt"). Your raw IP address is immediately discarded after this calculation and is never stored. This identifier is reset every 24 hours and cannot be used to track you over time or across different websites.

We do not use cookies for this purpose and do not collect any data that directly identifies you, such as your name or email address.
Your Right to Object: You have the right to object to this processing. You can exercise this right by enabling the "Do Not Track" (DNT) setting in your browser, which our analytics service respects, or by visiting our opt-out page here: [Link to Customer's Opt-Out Page].

Conclusion and Final Recommendations

This report has established a dual-mode architectural framework designed to provide a compliant, cookieless web analytics service that meets the market's demand for privacy-first technologies. By systematically analyzing the GDPR, ePrivacy Directive, and CCPA, and adopting a conservative "highest-common-denominator" approach, the platform can offer its customers two distinct levels of legal assurance. Mode 1 achieves true anonymity, placing it outside the scope of privacy law, while Mode 2 leverages the Legitimate Interest legal basis to provide richer insights through carefully controlled pseudonymisation.
The core of this framework is a deep understanding that legal compliance in this space is not about a checklist of data points, but about a holistic assessment of the processing methods and the cumulative identifiability of the data collected. The primacy of the ePrivacy Directive dictates a "zero-footprint" client-side script, while the principles of data minimization and the "singling out" doctrine from GDPR guide the necessary server-side aggregation and truncation.
To ensure the long-term success and legal integrity of the platform, the following recommendations should be adopted:

  • Recommendation 1: Prioritize and Promote Mode 1. Mode 1, the Anonymity Standard, should be positioned as the default and recommended option for all customers. Its legal footing is unambiguous and virtually unchallengeable. It perfectly delivers on the core brand promise of a "zero-worry" analytics tool and requires no action (like updating a privacy policy) on the part of the customer. This simplicity and absolute legal safety is a powerful competitive differentiator.
  • Recommendation 2: Position Mode 2 as a Deliberate Upgrade. Mode 2, the Legitimate Interest Standard, should be presented as an advanced feature for power-users who understand and accept the associated responsibilities. The platform must be transparent and explicit with customers that enabling Mode 2 means they are processing pseudonymised personal data. They must be required to acknowledge that this necessitates updating their website's privacy policy and conducting a Legitimate Interest Assessment. Providing high-quality templates and educational resources for these tasks is not just a value-add but a core requirement for responsible service provision.
  • Recommendation 3: Strongly Advise Against Persistent Cross-Session Tracking. The daily salted hash mechanism is a defensible, state-of-the-art compromise for 24-hour unique visitor counting. However, there will be market pressure and customer requests for longer-term or even permanent visitor tracking. Resisting this temptation is paramount. Any attempt to implement a stable, persistent identifier (e.g., using a 30-day salt, or more advanced fingerprinting techniques) would cross a clear legal line, unequivocally triggering the ePrivacy Directive's consent requirement. This would fundamentally undermine the product's core value proposition of being a "no banner, no worry" tool. The platform's greatest long-term strength, both legally and commercially, will be its disciplined refusal to engage in the invasive tracking practices of the past.

References

  1. The European Union (EU) General Data Protection Regulation (GDPR) - Pitt HRPO
  2. California Consumer Privacy Act, California Privacy Rights Act FAQs for Covered Businesses - Jackson Lewis
  3. Plausible: Privacy focused Google Analytics alternative
  4. Plausible: Privacy focused Google Analytics alternative - Propos Travel
  5. Art. 4 GDPR – Definitions - General Data Protection Regulation (GDPR)
  6. What is considered personal data under the EU GDPR?
  7. What is personal data? | ICO
  8. Data protection explained - European Commission
  9. Section 1798.140. Definitions - Consumer Privacy Act
  10. What is "Personal Information" under the CCPA - SixFifty
  11. Article 4 GDPR. Definitions
  12. Browser Fingerprinting and the GDPR • legalweb.io
  13. Device Fingerprinting: What It Is And How Does It Work? - Clearcode Blog
  14. The ePrivacy Directive - Cookie Information
  15. ePrivacy Compliance - Fathom Analytics
  16. ePrivacy Directive, GDPR, And The Future of EU Data Privacy - Usercentrics
  17. ePrivacy Directive, National Implementations and Website Analytics - General - Matomo
  18. ICO's 2025 Guidance: Stricter Rules for Cookies & Tracking - AesirX
  19. Guide to Google Analytics and Cookie consent
  20. CNIL continues to crumble cookies recent enforcement actions impact on organisations with a French p
  21. Cookies - Data Protection Hub
  22. ICO consults on 'storage and access' (cookies) guidance - Lewis Silkin LLP
  23. Cookies and Consent: the ICO's Cookie Review - Clarkslegal LLP
  24. Cookie guidelines in France: compliance with CNIL and French privacy laws
  25. What are the CNIL guidelines for user's consent and cookies | Adobe Analytics
  26. CNIL Cookies: Step-by-Step Guide to Comply - Captain Compliance
  27. Consent exemption according to the CNIL - Starfox Analytics
  28. Drop analytics cookies without consent with the CNIL exemption
  29. How to make your website compliant with CNIL | Piwik PRO help center
  30. CNIL Compliance for Ecommerce Tracking FAQ - General - Matomo Analytics Platform
  31. Quelle est la différence entre les données pseudonymisées et les données anonymisées ? | European Data Protection Board
  32. Pseudonymization and anonymization of personal data - Complior
  33. Anonymisation and pseudonymisation - Data Protection Commission
  34. CCPA Personal Information: Definition, Categories & Examples - Ketch
  35. What Is Legitimate Interest Under the GDPR? - IT Governance
  36. Leveraging GDPR Legitimate Interests Processing for Data Science - TrustArc
  37. How do we apply legitimate interests in practice? | ICO
  38. How to conduct Legitimate Interests Assessment (LIA) - Data Privacy Manager
  39. Unpacking GDPR: Legitimate interest - Thoropass
  40. Plausible: GDPR, CCPA and cookie law compliant site analytics
Try a walking desk

Long coding sessions lead to physical fatigue and mental fog. A walking desk keeps you alert and focused, preventing costly bugs and burnout.Stay focused and healthy during long coding sessions.Get the factsGet the facts

Comments temporarily disabled because Disqus started showing ads (and rough ones). I'll have to migrate the commenting system.