No page statistics in piwik

Recently I noticed that my piwik installation wasn’t providing page statistics for the recorded websites. While the number of visitors was tracked correctly, the visitor’s page views and further detailed data were not available.

Fixing broken piwik_log_link_visit_action

Being clueless for a while I had a look at piwik’s database. Indeed, table piwik_log_link_visit_action was not storing any entries past a certain point in time. Doing a check on the table

Operations -> Check Table

in phpMyAdmin revealed that the table was broken. Doing a repair of the table

Operations -> Repair Table

fixed the issues and piwik was recording all information properly again.

A note on archive.php and self-signed certificates

When I was investigating above issue, I stumbled across a problem with the auto-archive script archive.php and self-signed certificates. While the command line script provides an option to the archive accept self-signed certificates, there is no proper way to do so with the web script.

If you don’t have SSH shell access to the server running piwik, you need to rely on archive.php to run the archiver. Temporarily changing the line

public $acceptInvalidSSLCertificate = false;

to

public $acceptInvalidSSLCertificate = true;

in core/CronArchive.php will make archive.php work with self-signed certificates.