
Matomo, formerly Piwik, is a free and open-source web analytics software based on PHP. It keeps track of visitors to your website and generates reports of metrics such as the number of visitors within a given period, the web browser they used, what they accessed, and so on. This is crucial information for businesses like e-commerce sites that require knowing the activity of buyers to improve their services. Matomo offers an option of self-hosting the software; this gives you a great deal of control and power over your data as you access it solely. Some important features of Matomo are:
This article explains how to install Matomo on Ubuntu 20.04 server.
SSH to your server as a non-root user with sudo access.
Update the system package list to update all packages to the latest available versions.
By default, Ubuntu 20.04 contains PHP version 7.4 in the repository list. Install PHP 7.4 and more modules.
Download the latest version of Matomo.
Create the installation directory /var/www/matomo.
Extract the downloaded archive.
Move the extracted files to the installation directory.
Change ownership of the installation directory.
Change access permissions for the directory.
Log in to MySQL shell. At the password prompt, just press Enter to continue.
Create a MySQL database named matomo.
Create a database user named matomouser with a password.
Grant the user full access to the database.
Save the changes made on the database.
Exit the MySQL shell.
Create an Apache virtual host configuration file named matomo.conf.
Add the following code to the file. Save and close the file.
Disable Apache default configuration file.
Enable Matomo Apache configuration file.
Enable Apache rewrite mode.
Restart Apache service.
To access the Matomo Web Interface, go to your browser and visit http://Server_IP/. For example:
You have installed Matomo on your server. First, access the Installation Wizard screen to complete installation by connecting to your database, creating an administrator account, and more settings. You can now access the Dashboard and configure it to begin adding a website to collect analytics data.
To learn more about using Matomo, go to the official documentation page.
0 Comments
Be the first to comment and share your perspective with the community.