WP-Matomo (WP-Piwik) plugin uses the Matomo API to show your Matomo statistics in your WordPress.com or self-hosted WordPress dashboard. It’s also able to add the Matomo tracking code to your blog and to do some modifications to the tracking code. Additionally, WP-Matomo (WP-Piwik) supports WordPress networks and manages multiple sites and their tracking codes. This plugin needs to be configured for it to work with Matomo.

You’ll need Matomo (Cloud or Self-hosted) and WordPress (WordPress.com or Self-hosted using WordPress.org).

Integrate Matomo Analytics to your WordPress website

To configure the plugin, follow these steps:

  1. Log in to your WordPress site as the administrator

  2. Click on “Plugins” from the left menu

  3. Search for “WP-Matomo” and click on “Activate”

  4. In the left menu, click “Settings” > “WP-Piwik”. The WP-Matomo Settings page appears

  5. Click on “Connect to Matomo” tab, choose the appropriate option from “Matomo Mode” dropdown:
    a. Choose “Self hosted (HTTP API, default)” for “Self-hosted Matomo”
    b. Choose “Cloud-hosted” for “Matomo Cloud”

  6. In the Matomo URL field, enter the Matomo URL:
    a. Enter your Matomo (Self-hosted) path, for example: /localhost/analytics/matomo
    b. Enter your Matomo Cloud URL, for example: YOUR-SUB DOMAIN.matomo.cloud

  7. In the Auth token text box, type your Matomo authentication token. How to find Auth Token

  8. Confirm the “Auto config” checkbox is selected and click on “Save Changes”

  9. You should see “WP-Matomo is successfully connected to Matomo” message. If you do not see the message, make sure the values you provided in steps 3 to 6 are correct, and then try again

  10. Click on “Enable Tracking” tab

  11. In the “Add tracking code” dropdown, select “Default tracking”

  12. Click on “Save Changes” and a success message will appear

  13. Open your website in the browser and perform some actions (eg: navigate to different pages)

  14. To view Matomo statistics for your site, in the left menu, click on Dashboard, then click WP-Piwik. The Matomo Statistics page appears with visitor statistics, site search statistics, and more. To view all the detailed reports please login to your Matomo instance

Congratulations, you should now be successfully tracking visitors with Matomo Analytics through your WordPress site! Happy Analytics.