Which laws apply to website analytics?
Two European rules apply, and they ask different questions:
| Rule | The question it asks | What it means for analytics |
|---|---|---|
| ePrivacy Directive, Article 5(3) | May you store or read anything on the visitor’s device? | Analytics cookies and local storage ids need prior consent in most EU countries |
| GDPR | Do you process personal data, and on what legal basis? | IP addresses and cookie ids count as personal data, so you need a basis, limits and contracts |
The GDPR defines personal data in Article 4(1) as information about an identifiable person, and Recital 30 names IP addresses and cookie identifiers as online identifiers. The European Data Protection Board’s Guidelines 2/2023 explain that the ePrivacy rule reaches beyond cookies to other ways of reading or storing data on a device, and they include some tracking that relies on the IP address alone. That is why regulators do not all read cookieless analytics the same way. Read the GDPR and ePrivacy Directive entries for the background.
What does GDPR compliant analytics need?
A short checklist, in the order a regulator or a customer’s privacy team tends to ask:
- Data minimisation. Collect what answers your questions and nothing more. Full IP addresses, long-lived ids and full URLs with query strings are the usual excess.
- A legal basis. Consent or legitimate interests are the two usual bases for analytics. Less data makes legitimate interests easier to argue.
- No device storage without consent. This is the ePrivacy part. A tool that stores nothing leaves no analytics cookie for your banner to ask about.
- A retention limit. A number of months, written down, after which data is deleted.
- A data processing agreement. The vendor processes data for you, so you need a DPA and a list of its subprocessors.
- A lawful route for transfers. If data leaves the EU, you need a mechanism for it, such as an adequacy decision or standard contractual clauses.
- An honest privacy policy. Say what you collect, why and for how long.
What does CrispStats collect, and for how long?
| Data point | Stored | Personal data? |
|---|---|---|
| Page path, referrer, UTM tags | Yes, query strings trimmed in the browser | Not on its own |
| Country, region, city | Yes, approximate | Not on its own |
| Browser, operating system, device type | Yes | Not on its own |
| Daily visitor hash | Yes, for one day’s counting | Pseudonymous, and unlinkable after the day |
| IP address and raw user agent | No | Read in memory, then discarded |
| Customer email from payments | Only as a one-way hash and a masked form | Pseudonymous: treat as personal data |
| User ids you send with identify | Yes, if you send them | Yes: treat as personal data |
Traffic data is deleted when it passes your plan’s retention period:
| Plan | Traffic data kept |
|---|---|
| Starter | 24 months |
| Growth | 60 months |
| Scale | Kept while subscribed |
The data processing agreement, the subprocessors and our privacy policy are published. The database is hosted outside the EU, in the region named on the subprocessors page, and the DPA covers transfers out of the EEA with a recognised mechanism such as the Standard Contractual Clauses. If you need data stored only in the EU, that is a reason to pick a different tool. Whether your overall setup complies is for you and your lawyer to decide.
Where does Google Analytics stand under the GDPR?
Google Analytics can be used under the GDPR, but it takes more work, mainly because it stores identifiers on the device. What Google’s own help pages say:
- Cookies. GA4 sets
_gaand_ga_<container-id>cookies, kept for 2 years by default, according to Google’s page on GA4 cookies. In most EU countries that means asking for consent first. - Consent mode. In the advanced setup of consent mode, visitors who decline send cookieless pings instead, and Google models the missing data. In the basic setup, tags wait for consent and decliners send nothing. See consent mode in the glossary.
- IP addresses. Google states that in GA4 IP addresses “are not logged or stored”, per its IP masking page.
- Retention. Event-level data is kept for 2 or 14 months on standard properties, as Google’s retention page lists it.
The data still goes to Google, a US company, so the transfer question applies. Since 10 July 2023 the European Commission’s adequacy decision for the EU-US Data Privacy Framework covers transfers to US companies certified under it. If you keep GA4, put it behind a consent banner, turn on consent mode and sign Google’s data processing terms. If you would rather not run a banner for analytics, analytics without a cookie banner covers what that takes. What regulators decided about it, case by case, is in is Google Analytics GDPR compliant?, and the product comparison is on CrispStats vs Google Analytics.