Page MenuHomeMiraheze

Add statistics interface for founders/users
Closed, ResolvedPublic


Add an interface so that users can see statistics for their wikis. Both Piwik or a web interface are possibilities.

Event Timeline

Thanks for reflagging this. Desperate to get this functionality. The success of the platform depends on it. Thanks.

Hi. I understand that Google Analytics is being removed.
But can I check progress for adding usage stats interface as per the Wikimedia functionality?

We have now received a green flag to take this project forward but really need this functionality to proceed with the Miraheze page.

What is ETA for this Task to be completed?

Google Analytics is declined for privacy reasons

Piwik or mediawiki stats? Even a simple page hits counter?
From my side, great to have one of these in place by Nov 9th.

There is no progress. If we intend to work on it, it will between January-June 2017.

Very useful feature. Still waiting for progress.

Can I check if it's possible to add a simple visit counter on the wiki while the feature for full stats is under consideration. Thanks in advance.

Any updates on the status of this request?

@Amanjosan2008 Unfortunately there are no more updates that what you see on this task :(

First steps taken towards this with the introduction of a hook into CreateWiki allowing additional steps to be added to the process of creating a wiki by different extensions.

Right, this is super early stuff now but is live and is where all the development work will be going. I'm aiming to make this an officially supported extension which will work with any MediaWiki and Matomo installation in either a farm or single wiki only set up. This will potentially slow down overall progress as I try and make the extension work for all from the start but given how long this has been a task for us and how complex the situation looks, I'm sure people won't mind.

I'm also now going to pre-make a project tag on Phab for this so any suggestions people have should be made here and then if they're worthy of consideration/implementation and won't be a quick few line job or not something I want to do right now, they can be taskified and we can monitor this project for real.

I can't estimate (and won't) how long this project will take but as this is a goal for July-December, I expect it will be done before December though most of my time will be in July and August I hope to get the bulk and potentially even a working version out for the end of next month.

Fantastic stuff. Will definitely get used and tested by the wiki I maintain.

Okay, quick status update for people.

The first step in this project has been done, all wikis are now being monitoring separately in Matomo meaning data is being collected entirely separately for each wiki we host starting now. This allows us more easily to use the API to manipulate requests to get the data we need per wiki and allow us to display it on wikis.

The next step is the biggest one which is somehow now getting that data and putting it into a format we can use to generate content on a special page within MediaWiki.

The next major step is done (sort of!), with this commit I added a wrapper function that can easily be used to query the API and then with this commit I made use of it initially to produce an array of the number of visits to a wiki per device. Below I've included a sample output on the command line for metawiki to show the sort of data I intend to implement to a special page eventually.

> var_dump( MatomoAnalytics::testModule( 'metawiki' ) );
array(12) {
  ["Car browser"]=>
  ["Feature phone"]=>
  ["Portable media player"]=>
  ["Smart display"]=>

The next small stages are just building up the functions before I start thinking of a way to implement this user facing wise.

And with this, the backend is done.

Anyone who wants to know the basic sort of information that will be available in MatomoAnalytics should read the comments on that commit and address anything else here.

(for the reference, I learnt a lot of interesting things about users while evaluating the functions, so I'm sure you will also learn a lot too about your users - I made sure to include everything I found useful at the very least!)

Hi! I'm so happy you are making progress with this task! I checked the link and I miss individual page views, like a top-ten or something similar. Also, the most-searched words using the wiki search field would be interesting in order to see which are the most user-wanted articles.


Right, Special:Analytics on every wiki now works.

It's in a teething stage where things are... ugly? I'm going to take a few days off to rest from the code and then see how I can come back to it with a fresh mind on cleaning stuff up.

However, it works and therefore this task is resolved.

Everyone - please enjoy.

Doesn’t look ugly to me. Works great. Nicely done.

That's awesome! Thank you so much. It certainly needs polishing, but I love that your made that... much quicker than expected!

I assume that all numbers refer to monthly visits? So, if it says that there are 300 visits from Chrome, it's during the past month? This should be specified somewhere. Also, I miss the total number of visits per month, which is a very important number IMO.

Thank you again :)

It is over the past month (as of yesterday). I’ll need to look at the total number of visits.

And it does need polishing but that’s because the API is hard to work with so I need to mess around with the results before passing it on.

I don't see stats on my Wiki:
In other wikis I see stats but can't tell which pages are popular.