When your Matomo server receives a GET or POST HTTP request, the request includes the full IP address of the visitor. With the IP anonymisation function enabled, Matomo immediately processes the request and masks the IP address according to your privacy configuration settings.

For example, if the visitor’s IP address is 255.255.255.255, Matomo can mask it to various degrees:

  • 0.0.0.0 (IP anonymised)
  • 255.0.0.0
  • 255.255.0.0
  • 255.255.255.0
  • 255.255.255.255 (full IP address, no masking)

This masking process removes parts of the IP address, reducing the possibility of identifying the visitor.

Matomo has an optional setting which allows you to use the full IP address (e.g. 255.255.255.255) to look up the geolocation from your preferred table; and then immediately add whichever masking you have chosen, before Matomo stores the IP address.

Note that when the location is detected based on an anonymised IP address, this may result in a different city, region, and even country being recorded. Therefore, the visitor location reports based on anonymised IP addresses will not be accurate.

Important note: While the full IP address remains in your web server logs (outside of Matomo’s control), Matomo only stores the masked version in its database. This process ensures that the data stored by Matomo cannot be easily traced back to an individual. However, if the full IP address still exists in your web server logs, the data is not fully anonymised or anonymised to the standard required by the GDPR.

Anonymisation Process

The anonymisation occurs in-memory and before the data is stored in Matomo’s database. So, if you enable this configuration, only the resultant modified address will be stored: no full IP address will be stored by Matomo.

Compatibility

IP anonymisation is fully compatible with Matomo’s other features, such as Geolocation. While it may render the location data inaccurate, depending on the level of anonymisation applied, it does not affect other IP-based features like IP filtering.

IP Filtering

IP filtering still works as expected, even when the IP is anonymised. If an IP address still appears in tracking after being added to the blocklist, it usually indicates a configuration issue rather than a problem with anonymisation. When IP anonymisation is applied, the last octets of the IP address are masked.

As a result, multiple devices sharing similar IP addresses (e.g., within the same network or subnet) will appear as the same address after anonymisation. This makes the IP address ineffective for distinguishing between individual devices. Note that although the IP is used for filtering purposes, it is not stored in Matomo.

IP anonymisation helps in complying with privacy regulations, such as the General Data Protection Regulation (GDPR) in the European Union, by reducing the possibility of identifying individuals from their IP addresses.

If you need more in-depth assistance, we offer support plans, including Matomo Cloud, and we can recommend consultants. Explore our online resources for additional guidance.

Previous FAQ: Does Matomo support IPv6 protocol?