Delete archived data for a specific website

Hello,

I am contacting you to learn more about the features offered by Matomo.

We have deployed Matomo within our Kubernetes cluster to centralize analytics tracking for several websites. We would like to administer and configure our instance to comply as closely as possible with GDPR requirements. So far, everything has been working correctly.

However, we are facing an issue regarding the management of data for each individual website. One of the websites would like to retain users’ IP addresses. This practice requires compliance with applicable personal data protection obligations, including appropriate measures such as obtaining consent where required and implementing a limited data retention period.

Matomo allows data anonymization to be enabled for a specific website, but it does not appear to be possible to delete data for a single website independently of the others. Unless I am mistaken, the archived data deletion features apply to all websites within the instance.

I would therefore like to know whether there is a solution that would meet this need:

  • Is a native feature for deleting data from a specific website planned for a future version of Matomo?
  • Is there a plugin that allows data deletion to be managed independently for each website?
  • If not, are you aware of another solution or recommended workaround for this limitation?

Thank you in advance for your assistance and for any information you can provide.

Kind regards,

Managing analytics across multiple websites can get complicated, especially when each site has different privacy requirements. I think having website-level data retention and deletion controls would make Matomo much more flexible. It would also help website owners maintain GDPR compliance without affecting data from their other websites. Has anyone found a reliable workaround for this?

I ran into the same wall when I needed to clear archived data for just one of my sites, since the deletion options in Matomo act on the whole instance rather than a single site. What worked for me was invalidating just that site’s archives and letting the archiver rebuild them, after taking a full database backup first since the delete is permanent. It took a while to re-archive on my busier site, but it kept the other sites’ data untouched.

You can already do that per site: Privacy > Anonymize data lets you pick one site and a date range. And for old raw logs there’s core:delete-logs-data with --idsite, works fine from cron.

As far as I can see there is no per-site delete built in, the deletion setting applies across the whole instance.

Worth raising it as a feature request with your exact use case, so the team can say if it is planned.

One important distinction: Privacy > Anonymize data changes how new visits are stored; it does not delete existing raw logs or archived reports. For a single site, core:delete-logs-data --idsite=... --dates=... can remove raw log rows, but aggregated archives may remain until you invalidate that site’s archives (for example with core:invalidate-report-data --sites=...) and let the archiver rebuild. Back up first. That still is not a one-click per-site erase, so a feature request for website-level retention/deletion makes sense.

If you want to delete archived data for only one website in a Matomo multi-site installation, first identify the correct website ID (idsite). Make sure you take a complete database backup before making any changes.

It’s important to understand the difference between deleting archived reports and deleting raw visitor logs. Archived reports are stored separately, so deleting them requires extra care to avoid affecting other websites in the same Matomo installation.

For example, if you’re managing analytics for a content website such as cookout menu keeping website-specific analytics organized can make reporting and performance tracking much easier.

You can also check Matomo’s official documentation for data deletion procedures:

Which Matomo version are you using, and do you want to remove only archived reports or all historical tracking data?