The default Matomo dashboard
|Available in||54 languages|
|Type||Open Web Analytics|
|License||GNU GPL v3|
Matomo is developed by a for-profit corporation who would like to sell you "could" hosting services for the Matomo software. The actual software is free software available under the GNU General Public License version 3. Their website refers to downloading the software as "Install Matomo On-Premise". You don't have to install it "On-Premise", it's free software you can install on a server on premise in the basement or on a remote cloud or bare metal server.
- 1 At A Glance
- 2 Features
- 3 Anti-Features
- 4 Verdict And Conclusion
- 5 System Requirements
- 6 Innocraft's Cloud Offerings
- 7 Installation
- 8 Alternatives
- 9 Links
At A Glance
Matomo can in theory track a websites visitors using:
- An image tag
- A HTTP tracking API (
matomo/matomo.php?arg=vals, see Matomo's Tracking HTTP API documentation)
The Matomo analytics portal has a really nice and professional-looking interface with floating widgets you can move around. There's a lot of different widgets you can add to the dashboard in order to see daily, weekly or monthly statistics at a glance.
Most of the Matomo widgets are highly configurable. As an example, thewidget can show a simple table, a simple table with visitor engagement metrics, a vertical bar graph, a pie chart or a tag cloud.
The Matomo dashboard offers more than just an overview with widgets. There are three out-of-the-box usable menus with sub-menus that can provide a lot of useful information:, and . The overviews in these sub-menus can be changed to show a day, week, month or a set numbers of days
Themenu lets you see an , , of visitors, a , people visited from (if you enabled GeoIP), people used, (shows OS and web browsers in different columns), people visited and it can also show and if you configured it to track those things.
The browser cookies and . will show you the most popular pages people went through to get to other pages.menu lets you see the most viewed (just URLs), (the first page a visitor viewed) and (the last page a visitor viewed), (same as but with titles instead of URLs), (Matomo can be configured to track site-internal search engines), , , (has to be configured), (doesn't show anything by default, perhaps it's configurable), , which will only work if you track using
can show you a lot of detailed information about where visitors came from or how they found your website. The sub-menus under let you see an , " " (search engines and referring websites), , , (excluded from ) and, if you configure any, . There is a you can use to track specific URLs. This can be used to track how well advertising campaigns or e-mail spam ("newsletter") are in bringing traffic to a specified page.
Matomo offers four different methods of web visitors:
- A highly configurable a image tag
- A HTTP API (actually the same API the image tag uses)
- Importing web server logs
The image tag method is only for those who are willing to spend some time implementing a proper way of calling it (in which case you might as well use it as a pure HTTP API, it's the same API). The "default" image tag proposed by Matomo's web interface is borderline useless. The basic image tracking tag proposed by the admin in interface under▸ is:
<img src="https://yoursite.tld/matomo/matomo.php?idsite=5&rec=1" style="border:0" alt="" />
Modern browsers tend to strip the HTTP referrer field. Other data is obviously not available to a PHP file being opened from a IMG tag in a web browser. The result is that the default image tag makes every page a visitor views appear to be your website's front page. It is, by default, utterly useless and you should ignore it as an option unless you are willing to spend time customizing it. The API supports a lot of arguments and it is well documented on the matomo "Tracking HTTP API" page. The image tag can be useful if you make your content management system call it with the pages title, the page URL, referring URLs (if any) and so on.
matomo/matomo.php file used to serve an image tag can be called directly from a content management system, or any piece of software (like mobile "apps").
/load.php) and the data generated is borderline useless. It works by parsing the logs using a Python program called
import_logs.py which posts the data from the logs to the HTTP API. There is a log analytics README.me but it's not very useful.
The Matomo website has a "Integrate" page that lists them all. The one you're using is probably listed on that page. The short list below is limited to the ones we've tested.
It's hard not to notice the unacceptably high amount of subtle advertisements in Matomo's interface. Many of them are in the form of misleading "Help texts" that are actually advertisements for proprietary software plugins. Most of this garbage is in files named
You can put an end that most of that crap from the
matomo/ folder with this fine command:
for f in plugins/ProfessionalServices/templates/promo*;do echo > $f;done
The advertising in Matomo isn't all that bad, there's free software with worse anti-features in them. We just note it as a minus column since it does have advertisement as an anti-feature.
Verdict And Conclusion
Matomo is a fully featured and very mature web traffic analytics platform. It's got a nice configurable dashboard, all the reports you would wish for with configurable time-frames and a really nice and fully featured API for developers.
Matomo is a completely fine alternative to solutions like Google Analytics and other proprietary software solutions. It is developed like a commercial product, and it sort-of is, but the product itself is fully free software (though many of the plugins available for it are not).
There are some downsides to it worth considering:
- It is very resource-heavy. It's not something you can just put on a shared server with a dozen websites and expect it to have zero impact on the average server load - depending on how much traffic you have. You won't really notice it if you've got less than 5k visitors/day. You'll probably
Matomo website story is that you need an "app" server with "2 CPU, 2 GB RAM, 50GB SSD disk" to handle 100,000 page views per month (3300 per day). The supposed requirements go up to "4 CPU, 8 GB RAM, 250GB SSD disk" if you want to track one million page views per month (33k/day) (from matomo.org: MATOMO REQUIREMENTS). While the clueless zoomer who calls web server software "app" is wrong about the storage space requirements and one CPU with 4 cores isn't "4 CPU", it is an indication of something worth being aware of: Matomo is a rather heavy and resource-hungry PHP application which puts a noticeable load on the MySQL server.
Matomo is something that will add noticeable load to a server even if you're just tracking 10000 visitors per day, it is not like adding a hourly cron job generating statistics from log using AWStats. A mere 10000/day won't break your box won't break your average bare metal server, but it does add enough of a load to make it show up in system monitoring tools like Munin as increased I/O utilization.
You should put it on a dedicated server or a dedicated cloud instance, not on a shared server hosting your websites, if you have something north of 20k visitors per day on average.
Innocraft's Cloud Offerings
Innocraft, the company who makes Motomo, is for-profit corporation who does offer commercial hosting for the Matomo analytics server software. The prices for their various solutions can be seen at matomo.org/pricing. Their offerings have, like so many other "cloud" offerings, small print that says there's an increased cost if you pay for an amount of pageviews and you go beyond that number (it's $5 per 10,000 additional page-views if you go for 100,000). Using that service seems as risky as all cloud offerings are in terms of gradually or rapidly increasing costs. Put slightly differently, if you pay $80/month for a dedicated bare metal server that's more than capable of handling five million pageviews a month instead of paying Innocraft/Matomo about $250/month for a million pageviews you're not risking having to pay an additional $26 if the monthly number of pageviews ends up at 1,000,010 or $78 extra if it's 1,200,010.
Matomo's cloud hosting products seem to be overly expensive and really risky in terms of cost. It's hard to not recommend against using them if you are an individual or a small company.
All of the above being said: Innocraft's offerings may be worth it even thought they are wildly overpriced, from a pure server-cost perspective, with increasing costs as pageviews increase. Having an employee setup, install and maintain Matomo isn't free. Matomo's prices could be perfectly reasonable if you work for a medium-sized or big corporation and you would have to hire a consultant or add an employee to get Matomo installed on your own bare-metal server. You can look at matomo.org/pricing if that's the case.
The installation package can be acquired from builds.matomo.org/matomo.zip. You will need to have a MySQL server with a database and a user-name and password you can use.
wget https://builds.matomo.org/matomo.zip unzip matomo.zip
Matomo unpacks to a folder named
matomo/. Matomo expects the web server to be able to write to that folder tree so you will need to
chown -R to make the files be owned by the user the web server is running as.
The next step is to navigate to the code>matomo folder using a web browser without any ad-blocking extensions like Ublock Origin (
/matomo/ is on several anti-tracker blacklists). That takes you to a installation guide with 8 steps, two of which require nothing more than clicking "Next" (unless you encounter an error). The first is just a "system check". The next step requires you to enter a MySQL database. That's followed by creating a super user login name and password. Filling in some e-mail address is required. There's two check-boxes below it asking if you want spam or not. We used a unique e-mail address just for Matomo, we'll update this page if they send spam even though we didn't sign up for it. Step 6 is to configure a website you'd like to spy on/analyze. It proposes using a Website URL beginning with
http:// like it's the 1990s, make sure you change that if you're using
You will need to make a GeoIP database available. Using the Maxmind City database is probably the easiest way if you're running it on a Linux box. Maxmind changed their Terms Of Service on Decmeber 30th, 2019. You can still get a special "download URL" for the database if you sign up with them and accept their new terms. The easier way is to install one of the many Linux programs that bundle the database or the package
geolite2-city-20191217 with a older, but still fine,
GeoLite2-City.mmdb file. That file needs to be placed in
GeoLite2-City.mmdb (or another simliar file if you choose DBIP) is in place.
Configuring A Practically Required Cron Job
Matomo can create reports from the data in it's database when you visit the web portal. That's really slow and it gets slower as the database fills with more data. You really should setup a hourly or bi-hourly cron job for it. The job needs to run
matomo/console with a lot of parameters including the URL to your Matomo installation. The cron job should look something like:
nice -n 19 /path/to/matomo/console core:archive --force-all-websites --force-all-periods=315576000 --force-date-last-n=1000 --url='https://your.analytics.serve.rltd/matomo/'
You don't strictly need that and you probably don't if you have 500 visitors per day or less.
Generating reports does some time (a minute or five depending on how many sites you ahve and how much traffic they have) and it does add some load to the server.
Disabling Useless Plugins
One of the first things you should do after installing Matomo is to go to▸ ▸ and look over all the plugins listed there. You will be overwhelmed by a list of 50 plugins, 46 of them active by default, in 3.14.
All the plugins provide some kind of functionality someone likes and/or needs. There is a fair chance that you don't need or want half of them for your particular use-case. You canc make Matomo a bit more light-weight if you disable things likeif it's not used for a Intranet website and if you're not running a Ecommerce site.
Using Web Server Logs To Track Visitors
First, a word of warning. Matomo is clearly not designed to be used as a log analyzer. It is really bad at it. See Log Analyzers for better alternatives.
The main issues with using it as a long analyzer are:
- Matomo will happily re-import the same log time and time again. You will have to reset your server log after it has been imported if you choose to import logs with a cron job/systemd timer.
- Matomo supports excluding URL parameters but it does not support excluding URLs. There is no way to make it not track URLs like
Server logs can be imported by calling the
misc/log-analytics/import_logs.py Python script bundled with Matomo. It requires some options:
||The number of threads|
||The site id set in the Matomo installation|
||The URL of your Matomo installation (not the site you're importing logs for)|
||Number of CPU threads to allow|
||Import static files|
||Import information about web crawlers|
The log importer can be used this way:
python /path/to/matomo/misc/log-analytics/import_logs.py --url=http://analytics.example.com --idsite=1234 --recorders=2 --enable-http-errors --enable-http-redirects --enable-static --enable-bots /path/to/access.log
Importing logs is really slow. It the Python program parses the log file and dumps the result in
/matomo/piwik.php with a few requests per second. It puts a fairly high load on the server. System monitoring programs like Munin will start showing a very clear and very visible spike if you add a hourly job that imports logs to Matomo.
Open Web Analytics is a somewhat similar free software web traffic analysis package. It's nowhere near advanced as Matomo, it has less features and there's no floating dashboard with movable and configurable widgets. It's like Matomo but a lot simpler. It's also way more light-weight.
The Matomo homepage is at matomo.org. There's ample documentation at matomo.org/docs/ and developer.matomo.org/guides/integrate-introduction.