This page explains how to install Matomo (Piwik) on your web server and start tracking your site web analytics. If you prefer to watch a video tutorial, click here: How to Setup Matomo Analytics (formerly Piwik Analytics) [Video]

Getting Started

Before you get started, ensure that you have the following:

  • A web server, shared hosting or dedicated server. If you do not have a web server or shared host to install Matomo (Piwik) on, you can get a pre-installed Matomo in minutes. Try the Matomo Cloud (formerly Piwik Cloud) service created by the makers of Matomo themselves.
  • Access to your web server (via shell or FTP)
  • A FTP Client (if you are installing Matomo (Piwik) on a remote server)

Start the Installation

Check to make sure that your web host meets the minimum requirements to run Matomo (Piwik).
If your web host offers one-click software (Softaculous or Installatron for example), you can install Matomo in one click. Otherwise, follow these steps:

  1. Download the latest release Matomo (Piwik) from here
  2. Unzip the zip file to a folder on your hard drive. This will create a “piwik” folder containing the files and directories.
  3. Open your FTP client and upload the Matomo (Piwik) files in ‘binary mode’ to the desired location on your web server. All files can be uploaded to a “analytics” sub-directory in your public www folder, for example http://yourdomain.org/analytics/ or you could setup Matomo in its own subdomain and upload all the files at http://analytics.example.org/

If you have SSH access to your server, you can use it instead of FTP as it is much faster: run wget https://builds.piwik.org/piwik.zip && unzip piwik.zip

When Matomo (Piwik) is uploaded you can move on to the next step!

The 5-minute Matomo Installation

Open your web browser and navigate to the URL to which you uploaded Matomo (Piwik). If everything is uploaded correctly, you should see the Matomo Installation Welcome Screen. If there are any problems, Matomo will identify them and help you out with a solution.

The Welcome Screen

Time to get started with the point-and-click installation! Click Next »

System Check

Matomo (Piwik) will check to make sure that your server meets the Matomo requirements. If everything is okay, you’ll see a long list like this:

If there is a problem, Matomo (Piwik) will identify it and tell you how to solve it, as in this example:

When all the requirements are met, click Next »

MySQL Database Setup

You should already have set up your MySQL database. If you do not have the database information, you may need to ask your web host or technical staff.

Security note: for added security, we recommend that you install Matomo (Piwik) in its own MySQL database and specify a username and password for a user that only has access to that database.

(Note that by default the port 3306 is used when connecting to the database. If your server uses a different port you can enter it after the hostname, for example localhost:3307)

Once you have filled in the form, click Next »

Matomo (Piwik) will add the necessary tables to your database:

Click Next »

Super User

The super user is the user that you create when you install Matomo (Piwik). This user has the highest permissions. Choose your username and password:

Do not lose this information; it is the only way for you to log in to Matomo (Piwik) for the first time. There is only one super user in each Matomo installation. The super user can perform administrative tasks such as adding new websites to monitor, adding users, changing user permissions, and enabling and disabling plugins.

By default the super user will be signed up for upgrade and security alerts, as well as for community updates. Uncheck these boxes if you do not want to receive these emails.

Fill in the information and click Next »

Set up Your First Website

Enter the name and URL of the first website you want to track. You can add more websites once the installation is complete.

Click Next »

Install the JavaScript Tracking Tag

Matomo (Piwik) will issue you with a JavaScript tag. This code must appear on every page that you want Matomo to analyze. We recommend that you paste this code immediately before your closing </head> tag (or in a general header file that is included at the top of all your pages).

If you use a CMS such as WordPress, Drupal or Joomla!, you can use an add-on, extension or plugin to make sure this tag appears where it needs to.

Otherwise you will need to insert your tracking tag manually.

When you have copied your tracking tag click Next »

Congratulations!

Matomo (Piwik) is installed and ready to track your visitors. As soon as visitors start arriving, Matomo will be keeping track of their data. Matomo reports are generated in real time, so you should see data in your Matomo dashboard straight away.

Click Continue to Matomo (Piwik) » and log in to your dashboard!

If something isn’t working correctly or you are experiencing an error, you may want to take a look at the Troubleshooting Guide.

Configuring Matomo

If the Matomo (Piwik) JavaScript tracking tag is properly installed on your website, you’ll be receiving real time analytics data. If you are not receiving any data, make sure that you have copied and pasted the Matomo Javascript code to your website’s pages.

If you want to give other users access to Matomo (Piwik), or monitor more than one website, or rebrand Matomo or install third party plugins, you will need to use the Administration pages. Click “Administration” in the top menu, then click “Users” to manage users and permissions.

When you have finished configuring Matomo (Piwik), you can set more restrictive permissions (ie. read only) to the “piwik/config/” folder. Matomo will always write its data inside the “piwik/tmp/” folder, so this is the only folder that requires write permissions.

Medium and High-Traffic Websites: Setup an automated task (cron) to process reports

If your website is a medium or high-traffic website (more than a few hundred visits per day), we highly recommend to set up auto-archiving cron task so that Matomo (Piwik) calculates your reports periodically. When the cron is setup and the timeout value increased, Matomo dashboard will load very quickly as the reports will be pre-processed by the core:archive command triggered by cron.

If you do not setup the cron, Matomo (Piwik) will recalculate your statistics every time you visit a Matomo report, which will slow Matomo down and increase the load on your database.

Instructions for setting up auto-archiving can be found on the Matomo (Piwik) website at How to setup Matomo auto-archiving.

Updates, Recommended Server Configuration, and More

Check also the Matomo (Piwik) Installation, Update & Optimization documentation for more information.

Any questions?

Many answers and more information about Matomo you can find here:

We are social

Follow us: