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:
- Log in to your Matomo account as the administrator:
- On the top right of the page, click the Administration ( ) 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.
- Use your web browser to visit https://extensions.joomla.org/extension/itcs-matomo.
- In the right sidebar, click Download.
- On the it-conserv.de site, click Plugins. Locate the Matomo Plugin, and then click DOWNLOAD.
- Save the .zip file on your local computer.
- Log in to your Joomla site as the administrator.
- On the top menu bar, click , and then click .
- Click the Upload Package File tab.
- Click Browse, and then select the .zip file you downloaded in step 4. Joomla installs the extension.
- On the top menu bar, click , and then click .
- In the Search box, type matomo and then press Enter.
- Locate the System - itcs Matomo plugin in the Plugin Name column.
- In the Status column, click the x icon to enable the plugin. The extension is now installed and activated.
- In the Plugin Name column, click System - itcs Matomo.
- In the Tracking Code text box, paste the tracking code snippet that you obtained in step 1.
- 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:
- Log in to your Matomo account as the administrator:
- On the top right of the page, click the Administration ( ) 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.
- Log in to Joomla as the administrator.
- On the top menu bar, click Extensions, click Templates, and then click Templates.
- Select the template you want to modify, and then paste the tracking code snippet that you obtained in step 1.
- 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.
For more information about Matomo, please visit https://matomo.org.