Matomo è una piattaforma di analisi web self-hosted. Permette di monitorare visitatori, performance e comportamento degli utenti.
Installare LAMP
sudo apt update
sudo apt install apache2 mariadb-server php libapache2-mod-php php-cli php-fpm php-json php-common php-mysql php-zip php-gd php-mbstring php-curl php-xml php-pear php-bcmath
Apri porte 80 e 443 nel firewall.
Database
sudo mysql_secure_installation
sudo mysql -u root -p
CREATE DATABASE matomodb;
CREATE USER 'user'@'localhost' IDENTIFIED BY 'pss';
GRANT ALL ON matomodb.* TO 'user'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;
exit;
Download Matomo
wget https://builds.matomo.org/matomo-latest.zip
sudo mkdir -p /var/www/matomo
sudo unzip matomo-latest.zip
sudo mv matomo/* /var/www/matomo
sudo chown -R www-data:www-data /var/www/matomo
sudo chmod -R 755 /var/www/matomo
Crea un VirtualHost Apache per Matomo, abbina ServerName al tuo dominio, abilita il sito e il modulo rewrite:
sudo a2ensite matomo.conf
sudo a2enmod rewrite
sudo systemctl restart apache2
Installazione web
Visita il dominio da browser. L'installer verificherà i requisiti, configurerà il database, creerà l'account admin e il sito da monitorare. Copia il codice di tracciamento nelle pagine del sito o usa un plugin CMS.
Conclusione
Matomo è ora installato e pronto per fornire statistiche dettagliate sul tuo sito.