If you have tracked personal data such as the full visitor IP, you may want to anonymize this collected data, in case you do not have consent for this data or no longer have a legitimate interest (learn more in the GDPR User guide).

To Anonymize previously tracked raw data, follow these steps:
* Login to Matomo as a Super User
* go to Administration > Privacy > Anonymize data.
* In the section “Anonymize previously tracked raw data” you can configure a one-off data anonymisation process to run on data you have tracked in the past.

Note: Data anonymization cannot be undone.

To start the data anonymization process:

  • choose to anonymise data for one website, or for all websites.
  • choose the start date and end date to anonymize data for
  • choose which visit or action data column to anonymize.
    • Visitor IP: If enabled, for all visits during this duration the IP will be anonymized by at least 2 bytes, for example ‘192.168.xxx.xxx’. If you have currently configured to anonymize by 3 bytes, then this setting will be respected and all IPs will be anonymized by 3 bytes.
    • Location: the location will be re-evaluated based on the anonymized IP (at least 2 bytes of the IP will be anonymized).
    • User ID: when you enable this option, the User ID will be replaced by a pseudonym to avoid directly storing and displaying personally identifiable information such as an email address. In technical terms: given your User ID, Matomo will process the User ID pseudonym using a salted hash function. Note: replacing with a pseudonym is not the same as anonymisation. In GDPR terms: the User ID pseudonym still counts as personal data. The original User ID could still be identified if certain additional information is available (which only Matomo and your data processor has access to).
    • Visit columns: specify a list of database columns in scope visit that you want to unset. Each value for that column will be set to its default value. Please note that if the same column exists in scope ‘conversion’, then this column will be deleted as well
    • Action columns: specify a list of database columns in scope action that you want to unset. Each value for that column will be set to its default value.

The process may take a long time and will therefore not be executed right away.

The anonymization should typically start within one hour.

You will be able to follow the current state of the process in the bottom of the “Anonymize data” page.

With Matomo you can also always anonymize Visitor IP addresses, geo-location information (country, region, city), pseudo-anonymize User ID, or respect the Do-Not-Track user preference: Learn more in the Privacy User guide.