IP anonymisation is the practice of removing or shortening part of a visitor’s IP address before an analytics tool stores it, so the address no longer points to one specific internet connection. It was a well-known option in Universal Analytics. In Google Analytics 4 there is no such setting, because Google states that GA4 does not log or store IP addresses at all.
How IP anonymisation works
Every device that loads a web page has an IP address, the number its internet connection uses to send and receive data. A traditional IPv4 address has four blocks, such as 203.0.113.42. Anonymisation, more accurately called truncation, sets the last block to zero, giving 203.0.113.0, an address shared with up to 255 others. For the longer IPv6 addresses, a larger part is removed.
In Universal Analytics you switched this on with a line in the tracking code, and Google truncated the address shortly after receiving it, before writing it to storage. GA4, which replaced Universal Analytics in July 2023, works differently. The visitor’s browser still sends each request to Google, and Google uses the IP address briefly to work out an approximate location, such as country, region and city, then discards it. There is nothing to switch on, which is why older advice to enable IP anonymisation no longer applies.
Server-side tagging adds another option. With server-side Google Tag Manager, data goes first to a server you control, which can truncate or remove the IP address before passing anything on to Google, Meta or other vendors.
Why it matters
Under UK GDPR, an IP address can be personal data, because combined with other information it can identify a household or a person. Truncation reduces the risk, but it is not anonymisation in the legal sense: the full address still reaches the vendor’s servers when the request is made, alongside cookie identifiers and device details.
That has practical consequences for UK websites. A privacy notice that says IP addresses are anonymised, so no personal data is collected, overstates what happens. The rules on analytics cookies under PECR apply regardless of what is done with the IP address afterwards, so truncation does not change whether you need consent. Treat it as a sensible data-minimisation step, not a substitute for a lawful basis, a working cookie banner or an accurate privacy notice.
Common mistakes
- Searching GA4 for an IP anonymisation switch, or adding the old anonymize_ip parameter to GA4 code, which has no effect.
- Describing analytics as anonymous in a privacy notice or cookie policy because IP addresses are truncated or discarded.
- Assuming every tool behaves like GA4. Many heatmap, chat, advertising and form tools receive full IP addresses and some store them; each needs checking against its own documentation and data processing terms.
- Overlooking GA4’s option to switch off granular location and device data collection, which is the closest thing GA4 now has to a minimisation setting for location.
How to act on it
Check what your site actually sends. Remove any leftover Universal Analytics code; it no longer collects anything, but old snippets linger in themes and plugins. In GA4’s data collection settings, review the granular location and device data option and decide whether you genuinely need city-level reports.
Next, list every other script that receives visitor data, and note what each vendor says it does with IP addresses. Make sure your privacy notice describes that processing plainly, without claiming anonymity. If you need tighter control, a server-side setup lets you strip IP addresses before data leaves infrastructure you control. Checking tracking against what a privacy notice claims is part of how I set up measurement in my performance marketing work.
