Free, independent guides since 2010

Analytics & data

Analytics and the GDPR: measuring legally in the EU

How to use website analytics in line with the GDPR and ePrivacy rules: consent, cookie-less tools, IP anonymisation, data transfers to the US, processing agreements, retention and your privacy statement.

<guide section="Analytics & data" type="article" read="1 min"/>

Measuring visitors means processing their data. Two sets of rules apply: the ePrivacy rules on storing or reading information on devices (cookies and similar), and the GDPR on processing personal data. This page gives the overview; it is not legal advice.

Two questions

  1. Do you store or read information on the device? Cookies, local storage, fingerprinting → consent is normally needed, unless strictly necessary.
  2. Do you process personal data? IP addresses, user IDs, behaviour linked to identifiers → the GDPR applies: legal basis, transparency, security, retention.

Options

SetupConsentNotes
GA4 with cookiesNeededConfigure Consent Mode (see Consent Mode)
Matomo without cookies, anonymised IPPossibly exemptDepends on national guidance
Cookie-less tools (Plausible, Fathom, Simple Analytics)Often exemptCheck their setup and local guidance
Server log statisticsNo device accessGDPR still applies to IP addresses

Checklist

  • Processing agreement with the analytics provider (see DPAs).
  • Data stored in the EU, or a valid transfer mechanism.
  • IP anonymisation or truncation where possible.
  • Shortest useful retention period.
  • No personal data in URLs or events.
  • Privacy statement that names the tool, purposes and retention.
  • A working opt-out or consent withdrawal.

Frequently asked questions

Is Google Analytics legal in the EU?

Since the EU-US Data Privacy Framework (adequacy decision of July 2023), transfers to certified US companies such as Google are covered. You still need consent for its cookies and a correct privacy statement.

Does IP anonymisation make analytics anonymous?

It helps, but analytics data with identifiers is usually still personal data. True anonymisation is hard.