Support article
How to Install Matomo: Google Analytics Alternative
Install Matomo on your hosting to have your own web analytics with privacy: requirements, installation and tracking configuration.
Introduction
Matomo (formerly known as Piwik) is the open source alternative to Google Analytics. It lets you analyze your website’s traffic with full privacy: the data is on your server, not on Google’s servers.
If you care about privacy, GDPR or just want to control your analytics data, Matomo is an excellent option. In this article you’ll see how to install it.
What Matomo is and why use it
Matomo is a web analytics platform installed on your own server. Its advantages over Google Analytics:
- Your data is yours. Not shared with third parties.
- GDPR compliance is easier.
- No sampling. Matomo analyzes 100% of your visits.
- No limits. No limit on websites or visits.
- Customizable. You can extend it with plugins.
With Google Analytics, your visitors’ data goes to Google’s servers. With Matomo, it stays on your hosting.
Matomo vs Google Analytics
| Feature | Matomo | Google Analytics |
|---|---|---|
| Data | On your server | On Google’s servers |
| Privacy | Excellent | Questioned |
| Cost | Free (self-hosted) | Free (with limitations) |
| GDPR compliance | Easier | Requires configuration |
| Sampling | No | Yes, in free GA |
| Plugins | Yes | Limited |
| Learning curve | Similar | Similar |
Server requirements for Matomo
- PHP 8.1 or higher.
- MySQL 5.7 or MariaDB 10.4 or higher.
- Minimum 128 MB PHP memory (256 MB recommended).
- PHP extensions: pdo, gd, xml, curl, mbstring.
- SSL certificate recommended.
Matomo is lightweight and works well on shared hosting. At miHosting, all professional plans meet the requirements.
Method 1: Install Matomo with Softaculous
The fastest way:
-
Log in to cPanel.
-
Find Softaculous Apps Installer.
-
Click Matomo.
-
Click Install Now.
-
Fill in the details:
Field What to enter Protocol https://(with SSL)Domain The domain where you want Matomo In Directory A folder like analyticsAdmin Username Your administrator username Admin Password A strong password Admin Email Your email -
Click Install.
[Imagen sugerida: screenshot of the Matomo installation form in Softaculous]
The installation takes a minute. Softaculous shows you your Matomo panel URL and your credentials.
Method 2: Install Matomo manually
Step 1: Download Matomo
- Go to the official website (matomo.org).
- Download the latest version in ZIP format.
Step 2: Upload the files
- Connect via FTP or use cPanel’s File Manager.
- Go to a folder like
public_html/analytics. - Upload and unzip the Matomo file.
Step 3: Create the database
- In cPanel, go to MySQL Databases.
- Create a database, for example
user_matomo. - Create a user with a strong password.
- Assign the user to the database with all privileges.
Step 4: Run the installer
-
Open your browser and go to
https://yourdomain.com/analytics. -
The Matomo installation wizard opens.
-
Follow the steps:
- Welcome: language.
- System Check: checks requirements.
- Database Setup: enter your database details.
- Super User: create the administrator user.
- Set up a website: add the website you want to measure.
- Tracking code: Matomo gives you JavaScript code to insert on your website.
[Imagen sugerida: screenshot of the Matomo installation wizard]
How to connect your website with Matomo
Matomo works with a tracking code, similar to Google Analytics’. You have to add this code to all pages of your website.
On a normal HTML website
Paste the code just before </head> on each page:
<!-- Matomo -->
<script>
var _paq = window._paq = window._paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//yourdomain.com/analytics/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '1']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
On WordPress
Install the official Matomo Analytics plugin and connect it with your Matomo installation. Even easier: there are plugins that integrate Matomo into WordPress without separate installation.
Initial configuration after installation
- Add websites to measure. In Settings → Websites.
- Configure event tracking. If you want to measure clicks, downloads or conversions.
- Enable email reports. To receive periodic summaries.
- Configure GDPR. Matomo has integrated privacy options.
- Review geolocations. So that country statistics are accurate.
Useful tips
- Protect your Matomo with a password. Even if you have SSL, add an HTTP protection layer or a directory password.
- Configure the archiving cron. Matomo needs to process data periodically. Configure a cron job from cPanel for automatic archiving.
- Don’t abuse plugins. Some Matomo plugins are paid and consume resources.
- Back up. Your analytics data is on your server; if you lose it, you lose it.
- Compare with Google Analytics. If you migrate from GA to Matomo, keep both for a while to compare data.
Common problems
Matomo shows no visits
Check that the tracking code is properly installed on your website and that it executes (check with the browser’s developer tools).
Country data isn’t accurate
Configure geolocation in Settings → Geolocation. Download the GeoIP database.
Matomo is slow
Configure the archiving cron so it processes data in the background. Without cron, Matomo processes everything in real time and is slow.
Statistics don’t match Google Analytics
It’s normal. Each tool measures differently (Matomo counts 100%, GA samples). There will be small differences.
My database grows a lot
Matomo stores all raw data. If you have high traffic, the database can grow. Configure data retention in Settings → Privacy → Delete old logs.
Frequently asked questions
Is Matomo free?
Yes, the self-hosted Matomo software is free and open source. There’s a paid cloud version (you don’t need it if you install it on your hosting).
Does Matomo comply with GDPR?
Yes, much better than Google Analytics. Matomo has integrated privacy and anonymization options.
Can I import my Google Analytics data?
Partially. There are tools to import historical data, but it’s not perfect.
Does Matomo slow down my website?
No. The tracking code is lightweight and loads asynchronously.
Do I need a VPS for Matomo?
For most websites, no. Matomo works well on shared hosting. For websites with millions of visits, a VPS is appropriate.
Your web analytics, private and under your control
Matomo is the serious and private alternative to Google Analytics. It lets you analyze your traffic without giving data to third parties, complying better with data protection regulations.
If you need help installing Matomo on your miHosting hosting, open a ticket from your client panel. Our technicians help you with installation and configuration.