If you have tracked personal data such as the full visitor IP, you may want to anonymise 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).

Note: Data anonymisation within the Matomo environment is irreversible and cannot be undone.

Start the data anonymisation process

To anonymise previously tracked raw data, follow these steps:

  1. Login to Matomo as a Superuser.
  2. Go to Matomo settings (Administration) Settings Cog Icon > Privacy > Anonymize data.
  3. 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.
  4. Choose to anonymise data for one website, or for all websites.
  5. Select the start date and end date to anonymise data for.
  6. Choose which visit or action data column to anonymise.
    • Visitor IP: If enabled, for all visits during this duration the IP will be anonymised by at least 2 bytes, for example ‘192.168.xxx.xxx’. If you have currently configured to anonymise by 3 bytes, then this setting will be respected and all IPs will be anonymised by 3 bytes. If you wish to fully anonymise the IP address, you should choose the option of fully masking the IP address.
    • Location: the location will be re-evaluated based on the anonymised IP (at least 2 bytes of the IP will be anonymised).
    • 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 anonymisation 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.

Note: Removing or anonymising old log data using the tools above would not automatically invalidate any past reports based on raw data that includes personal data. If personal data is included in past reports, a report invalidation might need to be triggered manually after anonymisation.

With Matomo you can also always anonymise Visitor IP addresses, geolocation information (country, region, city), and pseudo-anonymise User ID. Learn more in the Privacy User guide.

Previous FAQ: Does Matomo log or track any (sensitive) data or text entered by users in my forms?