Page MenuHomeMiraheze

Add statistics interface for founders/users
Closed, ResolvedPublic

Description

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?

MacFan4000 added a comment.EditedOct 24 2016, 17:06

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.

I support this request

John moved this task from Waiting for review to Backlog on the Extensions board.Nov 3 2016, 16:57
John moved this task from Backlog to MediaWiki on the Goal-2017-Jan-Jun board.

Can I check progress on this?

John added a comment.Nov 29 2016, 14:57

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 :(

Bitonio added a subscriber: Bitonio.Sep 13 2017, 04:07
MacFan4000 moved this task from Unsorted to MediaWiki on the MacFan4000 board.Dec 5 2017, 15:10
John claimed this task.Jul 16 2018, 19:44

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.

John added a comment.Jul 16 2018, 20:11

Right, this is super early stuff now but https://github.com/miraheze/MatomoAnalytics 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.

John moved this task from Backlog to MediaWiki on the Goal-2018-Jul-Dec board.Jul 23 2018, 19:50
John added a comment.Jul 23 2018, 19:55

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.

John added a comment.Aug 1 2018, 13:38

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) {
  ["Desktop"]=>
  int(1204)
  ["Smartphone"]=>
  int(273)
  ["Tablet"]=>
  int(147)
  ["Unknown"]=>
  int(17)
  ["Phablet"]=>
  int(10)
  ["Console"]=>
  int(9)
  ["Camera"]=>
  int(0)
  ["Car browser"]=>
  int(0)
  ["Feature phone"]=>
  int(0)
  ["Portable media player"]=>
  int(0)
  ["Smart display"]=>
  int(0)
  ["Tv"]=>
  int(0)
}

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

John added a comment.Aug 1 2018, 23:19

https://github.com/miraheze/MatomoAnalytics/compare/a31ef3b19524...b14a0c21509f

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!)

NDKilla awarded a token.Aug 1 2018, 23:41
Paladox added a subscriber: Paladox.Aug 2 2018, 00:12

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.

Thanks!

John closed this task as Resolved.Aug 8 2018, 00:12

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 :)

John added a comment.Aug 8 2018, 13:17

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.