Install Matomo - Self-Hosted Google Analytics Alternative - on Windows 🌱

What is Matomo?

Matomo is the ethical alternative where you won't make privacy sacrifices or compromise your site. Matomo's the Google Analytics alternative that protects your data and your customer's privacy. A powerful web analytics platform with 100% data ownership. - https://matomo.org

Installation

  1. Download XAMPP Download
  2. Download Matomo Download
  3. Install Microsoft Visual C++
  4. Right click the downloaded XAMPP file > Extract All...
  5. Right click the downloaded Matomo .zip file > Extract All...
  6. Cut the matomo folder inside the XAMPP/htdocs directory
  7. Copy the extracted XAMPP directory to a safe location to run from, C:\Program Files for example
  8. Run XAMPP/setup_xampp.bat to update the configuration files with the new server location
  9. Run XAMPP/xampp-control.exe
  10. Click the Start button next to Apache and MySQL
  11. Navigate to XAMPP/mysql/bin
  12. Hold the SHIFT key and right click in the white space > Open PowerShell windows here...
  13. Type the following in the PowerShell window to setup the database
    .\mysql -u root
    CREATE DATABASE analytics DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
    CREATE USER 'analytics_rw'@'localhost' IDENTIFIED BY 'An@lyt1c$!';
    GRANT ALL ON analytics.* TO 'analytics_rw'@'localhost';
    FLUSH PRIVILEGES;
    exit;
  14. Open a web browser and navigate to http://DNSorIP/matomo
  15. Click the Next button on the Welcome screen
  16. Click the Next button on the System Check screen
  17. Fill in the database connection form as follows and click the Next button

    Database Server: 127.0.0.1
    Login: analytics_rw
    Password: An@lyt1c$!
    Database Name: analytics
    Table Prefix:
    Adapter: MySQLI

  18. Click Next on the Creating the Tables page
  19. Enter a Superuser login, password and email > Click Next
  20. Complete the form to setup the first site to start tracking analytics > Click Next
  21. Click Next then Continue to Matomo
  22. Login with the Superuser username and password created earlier
  23. Welcome to Matomo

Installing Dark Theme (Optional)

  1. Click the gear icon in the top right
  2. Select Platform > Marketplace from the left navigation menu
  3. Change the Show dropdown to Themes and search for Dark Theme
  4. Find Dark Theme and click the Install button
  5. Type the admin password to confirm the installation
  6. Click the Activate Theme button

Source: https://matomo.org/docs/installation/#getting-started