Tracking code for Matomo, by Sergio Santos


This unofficial, simple plugin helps you add a tracking code for Matomo to your WordPress website, for an easier integration.

For more information about Matomo, visit


Matomo is a registered trademark of its original owner. The name « Matomo » is used for identification and reference purposes only and does not imply any association with the trademark holder of their product brand, or any of its subsidiaries or its affiliates. This plugin is not affiliated, associated, sponsored, authorized, endorsed, maintained by, or in any way officially connected with Matomo.

Captures d’écran

  • The main settings page. It uses the same look as the native pages. Everything is as simple as possible and all options have a small description to aid the user.


This section describes how to install the plugin and get it working.

  1. Install and activate the plugin as you normally would. (You can find more details and instructions here.)
  2. Visit the « Tracking code for Matomo » page in the « Settings » section and adjust the parameters. Don’t forget to click « Save Changes » when you’re done.


Can i install this plugin on my commercial website?

Yes! This plugin is free for all uses and distributed under the GPLv3 licence.

There’s a problem. Can you fix it?

Perhaps. Please file a bug report here and i will look into it as soon as possible.

You’re giving away your work for free. What’s the catch?

There is no catch – really. There are no hidden links, no hacks, nothing… the plugin just does what it says and nothing more.
I’m giving you this plugin because others worked to give us WordPress for free – i’m just giving something back.

This plugin is pretty cool. How can i repay you?

Thanks! If you’d like to give something back, visit this page to see how you can contribute to WordPress.
If you’re keen on thanking me personally, you can visit my page to see how we can help each other.


8 février 2021
Does exactly what I want it to do and nothing more. Works perfectly with any Matomo install.
29 avril 2020
Instead of using API tokens, just adds tracking code to WP site and ties it to Id set in Matomo. Simple and elegant plugin.
10 juillet 2017
Wonderfully simple plugin – it took but seconds to install and get working because it just uses the site ID (no need to generate an API authentication token per site). Of course, that means you won't get stats in the WP control panel, but it also ensures you do not leave an authentication token behind for any successful hacker to find. Recommended.
15 juin 2017
Simple, fonctionnel efficace, que demander de plus ? merci pour ce bon travail ! 🙂
Lire les 6 avis

Contributeurs & développeurs

« Tracking code for Matomo, by Sergio Santos » est un logiciel libre. Les personnes suivantes ont contribué à cette extension.




  • Made several adjustments to improve compliance with’s trademark policies.
  • Made minor adjustments to code comments.
  • Fixed names of translation files.
  • Confirmed compatibility with WordPress 5.6 .


  • Added option to choose between SetCustomVariable (old) and SetUserID (better) method for tracking usernames.
  • Fixed bug in noscript tag code output.


  • Added option to disable cookies.


  • Renamed Piwik to Matomo.
  • Implemented internal search tracking.
  • Confirmed compatibility with WordPress 5.1 .


  • Confirmed compatibility with WordPress 4.9 .
  • Improved support for localization.


  • Improved support for localization.


  • Slightly improved SSL support in tracking code.


  • Added support for heartbeat timer.
  • Improved plugin internal structure.
  • Slightly improved noscript image styling.


  • Confirmed compatibility with WordPress 4.8.1 .
  • Moved JavaScript code to head.
  • Updated graphics.


  • Confirmed compatibility with WordPress 4.7.3 .
  • Updated information.


  • Fixed settings loss when upgrading to 1.0.7 .


  • Reviewed code and screenshots.
  • Replaced old identity (Mente Binaria) with new one (Sergio Santos).
  • Added Portuguese translation.


  • Ports are now accepted in address.


  • Fixed minor bug in settings page.


  • Added option to log user names (thanks cwerner1111).


  • Fixed bug in script output (thanks cwerner1111).


  • Improved readme.txt.
  • Added banners.


  • Improved the code structure.


  • Initial version.