This tutorial by user Blago Eres will show you how to set up Matomo Web Analytics on your FreeBSD server with Nginx. Matomo, formerly known as Piwik, is an open-source web analytics application that runs on PHP and MySQL web servers. Matomo is an alternative to the popular Google Analytics. See the link below for the full set of instructions on how to get started.

Requirements

To run Matomo (Piwik) on your FreeBSD 12.0 system you will need a couple of things:

  • A web server such as Apache, Nginx, IIS.
  • PHP version 5.5.9 or higher with pdo and pdo_mysql or mysqli, gd, xml, curl, and mbsting extensions. PHP 7+ is recommended.
  • MySQL version 5.5 or higher, or the equivalent MariaDB version. MySQL 5.7+ is recommended.

Full tutorial: https://www.howtoforge.com/how-to-install-matomo-web-analytics-on-freebsd-120/