How do I configure data retention in Matomo?

Go to Administration > Privacy > Data Retention. You can configure how long Matomo keeps raw visitor logs and aggregated report data. The default is to keep everything indefinitely.

For GDPR compliance, we recommend setting raw data retention to 6-12 months. Aggregated reports can be kept longer since they contain no personal data. Reducing retention also improves database performance on large instances.

Have some questions? We have your solution.