Root-Server Tutorial

ROOT-SERVER TUTORIAL

Setup of Matomo in a Webhosting Package

Learn how to install Matomo on your netcup Webhosting Package to track your website visitors without violating their privacy.

Introduction

Welcome to this tutorial on setting up Matomo, a powerful web analytics platform, on your server.
Matomo allows you to gain valuable insights into your website's performance and visitor behavior while ensuring data privacy and control.
In this guide, we will walk you through the step-by-step process of installing Matomo on your server, from creating a subdomain to configuring the necessary settings.
By the end of this tutorial, you'll have Matomo up and running, providing you with essential data to make informed decisions about your website.

Step 1 - Setup of a new subdomain

If you don't want to use a subdomain, you can skip this step.

  1. Log in to the CCP (Customer Control Panel) under https://www.customercontrolpanel.de.
  2. On the left side, click on "Products".
  3. If you have multiple products, select the one you want to use by clicking on the magnifying glass symbol next to it.
  4. Because you will need this value later, copy the value of the "MySQL-Server:" field (e.g. mysqlexyz.netcup.net).
  5. In the new window, on the bottom, click on "Plesk Overview".
  6. In the new browser tab, click on "Add Subdomain".
  7. In the input field, enter your subdomain name (e.g. matomo).
  8. In the dropdown menu, select the domain you want to use.
  9. Click on "OK".

Step 2 - Getting an SSL Certificate

  1. Under "Security", click on "SSL/TLS Certificates".
  2. Click on the "Install" button.
  3. Enter your email address.
  4. Check the last checkbox.
  5. Click on "Get it free".
  6. On the left side, toggle the "Redirect from http to https" switch to "On".
  7. On the left side, toggle the "OCSP Stapling" switch to "On".
  8. On the top, click on your subdomain (e.g. matomo.example.com).

Step 3 - Creating the database

  1. Click on "Databases" on the left side.
  2. Click on "Add Database".
  3. In the first input field, enter matomo.
  4. In the "Related site" dropdown menu, select the subdomain you created in step 1.
  5. On the bottom, in the "Database user name" input field, enter matomo.
  6. Click on the "Generate" button next to the "Database user password" input field to generate a secure password.
  7. Click on the "Show" button next to the "Database user password" input field to show the password, and then copy it.
  8. Click on "OK".

Step 4 - Downloading Matomo

  1. In the Plesk side menu on the left side, click on "Files".
  2. Click on the folder named after your subdomain (e.g. matomo.example.com), and then on httpdocs.
  3. Click on + and then on Import file via URL.
  4. Copy the following URL and paste it into the input field: https://builds.matomo.org/matomo-latest.zip.
  5. Click on Import.
  6. If you can't see the file matomo-latest.zip in the folder, reload the page.

Step 5 - Extracting Matomo

  1. Click on matomo-latest.zip.
  2. Click on OK.
  3. Select all checkboxes that are not for the matomo folder.
  4. Click on Remove in the menu on the top.
  5. Open the matomo folder by clicking on it.
  6. Click the topmost checkbox to select all files and folders (in the table header, next to the Name column).
  7. Click on Move in the menu on the top.
  8. Double-click on the folder named after your subdomain (e.g. matomo.example.com).
  9. Click on the httpdocs folder.
  10. Click on OK.

Step 6 - Installing Matomo

  1. Open your browser and go to your subdomain (e.g. https://matomo.example.com).
  2. Click on Next.
  3. Everything should be green. If not, fix the issues - Matomo will tell you how.
  4. Click on Next.
  5. Enter your database credentials (database name, database user name, database user password) from step 1.4 and 2 (Warning: The username and database name have a prefix which is your user-id followed by an underscore, e.g. k123456_matomo).
  6. You can leave the "Table Prefix" setting as it is.
  7. Change the "Adapter" setting to MYSQLI (This is because the current version has shown some issues with the PDO adapter during testing).
  8. Click on Next.
  9. Click on Next.
  10. Enter credentials for a new superuser account. This will be the account you will use to log in to Matomo as an administrator.
  11. Click on Next.

Step 7 - Finishing the installation

  1. Enter an identifier for your website (e.g. My Homepage).
  2. Enter the domain of the website you want to track (e.g. example.com).
  3. Set the timezone to your timezone.
  4. If your website is an ecommerce website, toggle the respective switch to On.
  5. Click on Next.
  6. Now you can copy the tracking code and paste it into your website.
  7. Click on Next.
  8. Click on Continue to Matomo.

Conclusion

You have successfully installed Matomo on your server.

From now on Matomo will be available under your subdomain (e.g. https://matomo.example.com).

Thank you for using this tutorial!

License

Copyright (c) 2023 Konstantin Protzen

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Contributor's Certificate of Origin

By making a contribution to this project, I certify that:

  1. The contribution was created in whole or in part by me and I have the right to submit it under the license indicated in the file; or

  2. The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same license (unless I am permitted to submit under a different license), as indicated in the file; or

  3. The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.

  4. I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the license(s) involved.

Published 13/09/2023 by Konstantin Protzen

Submit your tutorial

Get 60€ netcup vouchers for every published tutorial.