Home PageSocialsBlog MetaPoetryTechThoughts/RantsProjectsVPS SetupGit ReposFriends of STUTS

VPS Setup

×

Matomo Analytics

OLD - Using plausible instead

mkdir /var/www/stats.stuts.uk

wget https://builds.matomo.org/matomo-latest.zip

cd /var/www/stats.stuts.uk
unzip ~/matomo-latest.zip

mysql -u root -p
    CREATE DATABASE matomo;
    GRANT ALL PRIVILEGES ON matomo.* TO 'matomo'@'localhost' IDENTIFIED BY 'SECURE_PASSWORD';
    FLUSH PRIVILEGES;

# ensured that php-fpm was enabled and running

# correct permissions
chown -R nginx:nginx /var/www/stats.stuts.uk
find /var/www/stats.stuts.uk/tmp -type f -exec chmod 644 {} \;
find /var/www/stats.stuts.uk/tmp -type d -exec chmod 755 {} \;
find /var/www/stats.stuts.uk/tmp/assets/ -type f -exec chmod 644 {} \;
find /var/www/stats.stuts.uk/tmp/assets/ -type d -exec chmod 755 {} \;
find /var/www/stats.stuts.uk/tmp/cache/ -type f -exec chmod 644 {} \;
find /var/www/stats.stuts.uk/tmp/cache/ -type d -exec chmod 755 {} \;
find /var/www/stats.stuts.uk/tmp/logs/ -type f -exec chmod 644 {} \;
find /var/www/stats.stuts.uk/tmp/logs/ -type d -exec chmod 755 {} \;
find /var/www/stats.stuts.uk/tmp/tcpdf/ -type f -exec chmod 644 {} \;
find /var/www/stats.stuts.uk/tmp/tcpdf/ -type d -exec chmod 755 {} \;
find /var/www/stats.stuts.uk/tmp/templates_c/ -type f -exec chmod 644 {} \;
find /var/www/stats.stuts.uk/tmp/templates_c/ -type d -exec chmod 755 {} \;
  • Matomo setup
  • Entered SQL info
  • Added a site (but didn’t propogate Javascript)

Note: Customised the “Home” site (stuts.uk) to track across all subdomains (yay - may be problem with dav and stuff) and set it to prepend the site domain to page title when tracking. Hid clicks to known alias URLs of Home in the “outlinks” stuff.

Note: Used an external JS script (‘https://stuts.uk/matomo.js’) to load tracking in, this should work fine when included in X.stuts.uk in the HTML head.

Note: Configured matomo to respect Do Not Track

Log Analytics

Using log files instead of javascript for monitoring website access