Deleted goal conversions in piwik_log_conversion



We have a piwik server running for several months and capturing quite a lot of visits. We are stuck to version 0.6.3 because we made a number of modifications to the source code and would be complex to upgrade to newer versions. We will address this issue as soon as possible, but for the moment we have other problem that looks quite serious.

For an unknown reason, rows are being deleted in piwik_log_conversion table. We have seen two cases:

  • One day, all rows were suddenly deleted. In the current database, there are only conversions from 18th january onwards, all previous data is missing. But if we restore a db backup of day 17, the data is still there.

  • For other days, some rows are lost, but only for specific goals. We haven’t found a clear pattern. For some days and some sites, all conversions are intact; but for other ones, we have detected that all conversions for some goals in several days have been deleted.

The conversions were ok in some moment, because the archived values are good. But in some moment we have deleted the archived values, and regenerated them again, and we have seen that the Goal_nb_conversions have dropped down a lot.

This is quite weird. We have reviewed our changes to the code and don’t see anything that may delete any data. Do you know any way in that Piwik could delete rows in this table? I thought that that Piwik only added rows to it.

Could it be related to when we deleted archive tables and regenerated them again?


(vipsoft) #2

In Piwik, there is only one place where rows are deleted from the log_conversion table – i.e., when a goal is deleted. Deleting archive tables and regenerating them does not call deleteGoal.


Thanks, that’s what I thought. But the mistery keeps open. There are nothing in our added code that may delete conversions. Perhaps it can be related to some type of data corruption in the tables or so. We’ll keep on investigating. :-?

By the way; is it a safe practice to delete data from piwik_archive_XXXX tables and to regenerate them by calling to the archiving script, or could it have unexpected side effects?

Thanks a lot.

(Matthieu Aubry) #4

amoyav, it is safe to delete piwik_archive_ tables


Thanks, it’s useful to know that.