How to use Matomo with Joomla

This article describes how to integrate the open-source Matomo (formerly Piwik) analytics platform with Joomla.

Using Matomo with Joomla

Matomo gathers detailed statistics about visitor traffic to your site. You can integrate Matomo with Joomla using either of the following methods:

  • Installing and configuring a Joomla extension.
  • Editing the Joomla template directly.

The following sections describe how to do both of these methods.

Before you can use Matomo with Joomla, you must first install the Matomo application files. There are two ways to do this:

  • If your hosting account includes Softaculous, you can use it to install Matomo.
  • If your hosting account does not include Softaculous, or if you want to install the newest version, you can install Matomo manually.
Method #1: Use an extension

There are several extensions available for Joomla that provide Matomo integration, but Matomo's own site recommends itcs Matomo. To install and configure the itcs Matomo extension on your Joomla site, follow these steps:

  1. Log in to your Matomo account as the administrator:
    • On the top right of the page, click the Administration ( Matomo - Administration settings icon ) icon.
    • In the left sidebar, click Websites, and then click Tracking Code.
    • Under JavaScript Tracking Code, copy the entire text in the tracking code box, including the starting <!—Matomo—> tag and the ending <!—End Matomo Code—> tag.
  2. Use your web browser to visit https://extensions.joomla.org/extension/itcs-matomo.
  3. In the right sidebar, click Download.
  4. On the it-conserv.de site, click Plugins. Locate the Matomo Plugin, and then click DOWNLOAD.
  5. Save the .zip file on your local computer.
  6. Log in to your Joomla site as the administrator.
  7. On the top menu bar, click Extensions, and then click Manage.
  8. Click the Upload Package File tab.
  9. Click Browse, and then select the .zip file you downloaded in step 4. Joomla installs the extension.
  10. On the top menu bar, click Extensions, and then click Plugins.
  11. In the Search box, type matomo and then press Enter.
  12. Locate the System - itcs Matomo plugin in the Plugin Name column.
  13. In the Status column, click the x icon to enable the plugin. The extension is now installed and activated.
  14. In the Plugin Name column, click System - itcs Matomo.
  15. In the Tracking Code text box, paste the tracking code snippet that you obtained in step 1.
  16. Click Save, and then reload your site in a web browser. Examine the page source code to verify that the Matomo tracking code is loaded. To view site statistics, log in to your Matomo account.
Method #2: Edit the template

Extensions are convenient, but they also carry processing overhead with them that may affect site performance. If you prefer not to use an extension, you can edit the Joomla template directly.

To enable Matomo by editing the template, follow these steps:

  1. Log in to your Matomo account as the administrator:
    • On the top right of the page, click the Administration ( Matomo - Administration settings icon ) icon.
    • In the left sidebar, click Websites, and then click Tracking Code.
    • Under JavaScript Tracking Code, copy the entire text in the tracking code box, including the starting <!—Matomo—> tag and the ending <!—End Matomo Code—> tag.
  2. Log in to Joomla as the administrator.
  3. On the top menu bar, click Extensions, click Templates, and then click Templates.
  4. Select the template you want to modify, and then paste the tracking code snippet that you obtained in step 1.
  5. Save your changes to the template, and then reload your site in a web browser. Examine the page source code to verify that the Matomo tracking code is loaded. To view site statistics, log in to your Matomo account.

More Information

For more information about Matomo, please visit https://matomo.org.

Did you find this article helpful? Then you'll love our support. Experience the A2 Hosting difference today and get a pre-secured, pre-optimized website. Check out our web hosting plans today.

We use cookies to personalize the website for you and to analyze the use of our website. You consent to this by clicking on "I consent" or by continuing your use of this website. Further information about cookies can be found in our Privacy Policy.