Site Statistics with Matomo

Since moving to WordPress, I’ve been wanting to add some form of visitor statistics to my site. This proved more difficult than I expected, though, due to some strict requirements that I had:

  • The data has to be self-hosted, to ensure that I know how it is used. I will never provide collected visitor information to a third party willingly.
  • I have to be able to respect the privacy requests of my visitors, such as the Do Not Track setting in browsers.
  • I have to be able to anonymize the information as much as possible. While I want to know aggregated information, I have no desire to know and be responsible for the detailed specifics of my visitors.

With those three requirements, many common services, such as Automattic’s JetPack and Google Analytics, were ruled out as there is no option to self-host the data or visibility into how anonymized the data was.

Recently, I stumbled upon Matomo. From their site:

Matomo (formerly Piwik) is the leading open-source analytics platform that gives you more than just powerful analytics: free open-source software; 100% data ownership; user privacy protection; user-centric insights; customisable and extensible.

Matomo ticks all of the boxes, and even a few I hadn’t thought of, such as having a mobile app and being open source. It even has complete WordPress support through the WP-Piwik plugin.

It respects the privacy of my visitors through a variety of methods, including:

  • Honoring Do Not Track requests.
  • Having an option (which I’ve enabled) to anonymize all IP addresses, allowing me to see the country a user was from but no more.

As of Saturday, June 4, 2016 I have enabled site statistics for this site using a self-hosted Matomo instance. If you would like to opt out of statistics for this and other respectful sites1, enable the Do Not Track setting for your browser.

Update January 10, 2018: Piwik changed their name to Matomo; I’ve updated this post and links accordingly.


  1. Websites have to volunteer to respect the Do Not Track setting; web browsers can only ask. ↩︎