matomo-org / matomo

Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
https://matomo.org/
GNU General Public License v3.0
19.89k stars 2.65k forks source link

Error in FAQ: Delete visits using SQL - not everything is deleted #17498

Open uok opened 3 years ago

uok commented 3 years ago

FAQ: https://matomo.org/faq/how-to/faq_20184/ Section "Delete visits using SQL query" Code "delete all data for a given website"

After running the code with e.g. log_visit.idsite = 1, everything is deleted from all tables except entries in table log_action. There are many entries left that belong to this site. How can I delete them? From what I can understand is that info is linked via idaction_name and idaction_url to this table.

What is the correct SQL code for this task?

It would be a lot better, if after a user deletes a website from Matomo GUI also the log data, reports, etc. are deleted from the database. I did not expect the need for this manual step after confirming "Deleting a website will delete all log data that has been collected for it. This action is permanent and cannot be undone." in the GUI.

flamisz commented 3 years ago

Hi @uok, thanks for creating this issue. I tested the SQL and indeed it does not emptying the log_action table, just deletes rows from it.

It's not a code related issue, I will discuss with the team what is the best way to solve this so we can hopefully get things sorted and working for you.

uok commented 3 years ago

@flamisz , can you please provide SQL commands for fixing? Thanks!

flamisz commented 3 years ago

Hi @uok,

unfortunately, currently, we can't provide an SQL command that emptying log_action table with the others.

uok commented 2 years ago

Is this fixed?