Merge pull request #143 from CuzImBisonratte/how-to-install-matomo

How-to-install-matomo Tutorial
This commit is contained in:
Christoph 2023-11-06 16:39:25 +01:00 committed by GitHub
commit cfc2c7e786
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 270 additions and 0 deletions

View file

@ -0,0 +1,135 @@
---
title: Setup of Matomo in a Webhosting Package
description: Learn how to install Matomo on your netcup Webhosting Package to track your website visitors without violating their privacy.
level: beginner
updated_at: 2023-09-13
slug: how-to-install-matomo
author_name: Konstantin Protzen
author_url: https://github.com/cuzimbisonratte
author_image: https://github.com/cuzimbisonratte.png
author_bio:
tags: [webhosting, tracking, analytics, matomo, privacy, gdpr, dsgvo, website, homepage,]
netcup_product_url: https://www.netcup.de/bestellen/produkt.php?produkt=3319
language: en
available_languages: [en, de]
---
# 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.

View file

@ -0,0 +1,135 @@
---
title: Matomo in einem Webhosting-Paket einrichten
description: Erfahre, wie du Matomo in deinem netcup Webhosting-Paket installieren kannst, um deine Website-Besucher zu tracken, ohne ihre Privatsphäre zu verletzen.
level: beginner
updated_at: 2023-09-13
slug: how-to-install-matomo
author_name: Konstantin Protzen
author_url: https://github.com/cuzimbisonratte
author_image: https://github.com/cuzimbisonratte.png
author_bio:
tags: [webhosting, tracking, analytics, analyse, matomo, privacy, privatsphäre, gdpr, dsgvo, website, homepage,]
netcup_product_url: https://www.netcup.de/bestellen/produkt.php?produkt=3319
language: de
available_languages: [en, de]
---
# Einleitung
Willkommen zu diesem Tutorial, das dir zeigt, wie du die leistungsstarke Webanalyse-Plattform Matomo auf deinem Server einrichtest.
Mit Matomo gewinnst du wertvolle Einblicke in die Leistung deiner Website und das Verhalten der Besucher, während du gleichzeitig die Privatsphäre und Kontrolle über deine Daten sicherstellst.
In dieser Anleitung führen wir dich Schritt für Schritt durch die Installation von Matomo auf deinem Server, von der Erstellung einer Subdomain bis zur Konfiguration der erforderlichen Einstellungen.
Am Ende dieses Tutorials wird Matomo einsatzbereit sein und dir wichtige Daten liefern, damit du fundierte Entscheidungen über deine Website treffen kannst.
# Schritt 1 - Einrichtung einer neuen Subdomain
Wenn du keine Subdomain verwenden möchtest, kannst du diesen Schritt überspringen.
1. Logge dich im CCP (Kundenkontrollpanel) unter https://www.customercontrolpanel.de ein.
2. Auf der linken Seite klicke auf "Produkte".
3. Wenn du mehrere Produkte hast, wähle das Produkt aus, das du verwenden möchtest, indem du auf das Lupensymbol daneben klickst.
4. Da du diesen Wert später benötigen wirst, kopiere den Wert aus dem Feld "MySQL-Server:" (z.B. mysqlexyz.netcup.net).
5. In einem neuen Fenster klicke unten auf "Plesk Übersicht".
6. In einem neuen Browser-Tab klicke auf "Subdomain hinzufügen".
7. Im Eingabefeld gib deinen Subdomain-Namen ein (z.B. matomo).
8. Im Dropdown-Menü wähle die Domain aus, die du verwenden möchtest.
9. Klicke auf "OK".
# Schritt 2 - Erhalt eines SSL-Zertifikats
1. Unter "Sicherheit" klicke auf "SSL/TLS-Zertifikate".
2. Klicke auf den "Installieren"-Button.
3. Gib deine E-Mail-Adresse ein.
4. Aktiviere das letzte Kontrollkästchen.
5. Klicke auf "Kostenlos erhalten".
6. Auf der linken Seite schalte den Schalter "Von HTTP auf HTTPS umleiten" auf "Ein".
7. Auf der linken Seite schalte den Schalter "OCSP-Anheftung" auf "Ein".
8. Klicke oben auf deine subdomain (z.B. `matomo.example.com`).
# Schritt 3 - Datenbank erstellen
1. Klicke auf der linken Seite auf "Datenbanken".
2. Klicke auf "Datenbank hinzufügen".
3. Im ersten Eingabefeld gib `matomo` ein.
4. Im Dropdown-Menü "Zugehörige Website" wähle die Subdomain aus, die du in Schritt 1 erstellt hast.
5. Unten im Eingabefeld "Datenbank-Benutzername" gib `matomo` ein.
6. Klicke auf den "Generieren"-Button neben dem Eingabefeld für "Datenbank-Benutzerpasswort", um ein sicheres Passwort zu generieren.
7. Klicke auf den "Anzeigen"-Button neben dem Eingabefeld für "Datenbank-Benutzerpasswort", um das Passwort anzuzeigen, und kopiere es.
8. Klicke auf "OK".
# Schritt 4 - Matomo herunterladen
1. Im Plesk-Seitenmenü auf der linken Seite klicke auf "Dateien".
2. Klicke auf den Ordner, der nach deiner Subdomain benannt ist (z.B. `matomo.example.com`), und dann auf `httpdocs`.
3. Klicke auf `+` und dann auf "Datei über URL importieren".
4. Kopiere die folgende URL und füge sie in das Eingabefeld ein: `https://builds.matomo.org/matomo-latest.zip`.
5. Klicke auf "Importieren".
6. Wenn du die Datei `matomo-latest.zip` nicht im Ordner siehst, lade die Seite neu.
# Schritt 5 - Matomo entpacken
1. Klicke auf `matomo-latest.zip`.
2. Klicke auf "OK".
3. Wähle alle Kontrollkästchen aus, die nicht den Ordner `matomo` betreffen.
4. Klicke im oberen Menü auf "Entfernen".
5. Öffne den Ordner `matomo`, indem du darauf klickst.
6. Klicke auf das oberste Kontrollkästchen, um alle Dateien und Ordner auszuwählen (In der Tabellenüberschrift, neben der Spalte `Name`).
7. Klicke im oberen Menü auf "Verschieben".
8. Doppelklicke auf den Ordner, der nach deiner Subdomain benannt ist (z.B. `matomo.example.com`).
9. Klicke auf den Ordner `httpdocs`.
10. Klicke auf "OK".
# Schritt 6 - Matomo installieren
1. Öffne deinen Browser und gehe zu deiner Subdomain (z.B. `https://matomo.example.com`).
2. Klicke auf "Weiter".
3. Alles sollte grün sein. Falls nicht, behebe die Probleme - Matomo wird dir sagen, wie.
4. Klicke auf "Weiter".
5. Gib deine Datenbank-Anmeldeinformationen (Datenbankname, Datenbank-Benutzername, Datenbank-Benutzerpasswort) aus Schritt 1.4 und 2 ein. (Warnung: Der Benutzername und der Datenbankname haben ein Präfix, das deine Benutzer-ID gefolgt von einem Unterstrich ist, z.B. `k123456_matomo`).
6. Du kannst die Einstellung "Tabellenpräfix" so lassen, wie sie ist.
7. Ändere die Einstellung "Adapter" auf `MYSQLI` (Dies liegt daran, dass es mit der aktuellen Version beim Testen einige Probleme mit dem `PDO`-Adapter gab).
8. Klicke auf "Weiter".
9. Klicke auf "Weiter".
10. Gib Anmeldeinformationen für ein neues Superuser-Konto ein. Dies wird das Konto sein, das du verwenden wirst, um dich als Administrator bei Matomo anzumelden.
11. Klicke auf "Weiter".
# Schritt 7 - Abschließen der Installation
1. Gib einen Bezeichner für deine Website ein (z.B. "Meine Homepage").
2. Gib die Domain der Website ein, die du verfolgen möchtest (z.B. "example.com").
3. Stelle die Zeitzone auf deine Zeitzone ein.
4. Wenn deine Website eine E-Commerce-Website ist, schalte den entsprechenden Schalter auf "Ein".
5. Klicke auf "Weiter".
6. Jetzt kannst du den Tracking-Code kopieren und in deine Website einfügen.
7. Klicke auf "Weiter".
8. Klicke auf "Weiter zu Matomo".
# Fazit
Du hast Matomo erfolgreich auf deinem Server installiert.
Ab sofort ist Matomo unter deiner Subdomain verfügbar (z.B. `https://matomo.example.com`).
Vielen Dank, dass du dieses Tutorial verwendet hast!
# 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.