It’s easy to add Matomo tracking to your WordPress site. You can either use the easy WordPress plugin (using the steps below), install the JavaScript code (using this guide), or install an image beacon (using this guide).

Requirements

Install the Connect Matomo (WP-Matomo) plugin in WordPress

  1. Log in to your WordPress site as the administrator.
  2. In the left menu, click Plugins > Add Plugin (if you can’t see the Plugins menu, then you can follow these steps instead to insert the Matomo tracking code manually in your WordPress Theme files).
  3. Search for Connect Matomo in the Keyword field.
  4. Click on Install Now next to the Connect Matomo plugin.
    install connect matomo plugin
  5. Once the plugin is successfully installed, click Activate.
    activate the connect matomo plugin
  6. In the left menu, click Settings > Connect Matomo.
  7. In the Matomo Mode dropdown, select the option Self hosted (HTTP API, default).
  8. In the Matomo URL text field, enter your Matomo URL, for example https://analytics.example.com.
  9. In the Auth token text field, enter your Matomo authentication token. How to find Auth Token.
  10. Confirm the Auto config checkbox is selected and click on Save Changes.
  11. You should see Connect Matomo is successfully connected to Matomo message. If you do not see the message, make sure the values you provided in the previous steps are correct, and try again.
  12. Click on the Enable Tracking tab.
  13. In the Add tracking code dropdown, select Default tracking.
    enable tracking in connect matomo
  14. Click on Save Changes and a success message will appear.
    installed connect matomo plugin

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