Page MenuHomePhabricator

Turn hit counters (which were removed in 1.25) into an extension
Closed, ResolvedPublic

Description

The view counter was removed in https://gerrit.wikimedia.org/r/#/c/150699/

But this is an essential to determine which pages are most useful to users or just "popular".

The reasons for it having flaws do not apply to company / intranet wikis.

On my company wikis I use a list on the start page "30 most popular pages" as a quick jump link list for unexperienced users.

Every shit blog, CMS etc has a list of the most popular pages. This cannot be done with trackers.

Furthermore you hereby encourage admins to use evil tracking software. That is so super backward thinking...

Please bring it back and leave it an optional decision for the admin to use or not to use it.

MEDIAWIKI IS NOT WIKIPEDIA!


Version: unspecified
Severity: enhancement

Details

Reference
bz72420

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Kghbln set Security to None.Jan 12 2015, 8:52 PM
Kghbln added a subscriber: Nemo_bis.
Kghbln added a subscriber: Kghbln.
Kghbln added a comment.EditedJan 12 2015, 9:16 PM

If core does not provide this an extension should really do so. There are indeed extensions around which depend on these numbers. I have asked a couple of people users across several different non-foundation wikis and they really do not like the idea of not having it around. Perhaps something for the next GSoC? The token is for having the ability to have these counters.

demon removed a subscriber: demon.Jan 12 2015, 10:07 PM

From a client: "We actually use this often. It is one way for moderators to have quick and easy access to whether a page is being used or not."

Note above was from a firewalled wiki. Following is from a client with a public wiki:

"We expose a link to Most Viewed Pages for our users and review this count periodically to gauge topic popularity. Google Analytics provides a means for the latter use case, however. And the former use case (a link for users) is no where near a critical feature of our site."

matmarex removed a subscriber: matmarex.Jan 13 2015, 7:20 PM
Nemo_bis raised the priority of this task from Lowest to Normal.Jan 14 2015, 9:12 PM
Nemo_bis added a project: MW-1.25-release.

@Nemo_bis: Do you plan to work on this or are you aware of someone who plans to work on this? Trying to understand why you increased the priority here.

Dzahn added a subscriber: Dzahn.Jan 14 2015, 9:15 PM

because it affects 3rd party wikis if core removes it. so having an extension to replace that would be good. imho it's possible for something to have a higher priority but still nobody working on it

MarkAHershberger raised the priority of this task from Normal to High.
MarkAHershberger added a subscriber: Palexis.

Taking this.

Taking this.

Awesome! There's a repo at mediawiki/extensions/HitCounters that you can use :)

Subfader added a comment.EditedJan 23 2015, 9:45 AM

Will the repo be available as regular extension on mediawiki.org?

Will the repo be available as regular extension on mediawiki.org?

Sure

This is just a cheer up! I'll sit tight.

So, since I haven't actually done anything with this till now, I'll get started. I have a client that would love to have this.

Change 202629 had a related patch set uploaded (by MarkAHershberger):
WIP: Initial work on HitCounters extension.

https://gerrit.wikimedia.org/r/202629

Change 203388 had a related patch set uploaded (by Martineznovo):
Don't drop the page count information for this release, push to 1.26

https://gerrit.wikimedia.org/r/203388

Prod added a subscriber: Prod.Apr 11 2015, 9:57 PM

Change 205479 had a related patch set uploaded (by MarkAHershberger):
Allow extensions to set .

https://gerrit.wikimedia.org/r/205479

Change 205479 merged by jenkins-bot:
Allow extensions to set $wgDisableCounters.

https://gerrit.wikimedia.org/r/205479

Nemo_bis added a comment.EditedApr 27 2015, 7:34 AM

I note that there is a demand for this feature on office.wikimedia.org, apparently: «one click access to most requested data», which could be done simply by transcluding SpecialPopularpages on the main page (once caching is disabled or whatever needed).
https://meta.wikimedia.org/w/index.php?title=File:WMF_CFA_-_Quarterly_Review_-_Q_3_2014-15.pdf&page=2

The extension is ready for testing and some initial code review. I still need to complete the bit SiteStats page, but I'd like to start getting feedback on what is there now.

@MarkAHershberger I might be dense, but where could one download the extension?

@MarkAHershberger I might be dense, but where could one download the extension?

You would have to use git to check it out right now. But since you ask: http://testwiki.nichework.com/HitCounters.tgz

It would be nice to get some testing of how well the regular update method

php maintenance/update.php --quick

works on a wiki being upgraded from 1.24 to 1.25.

Status: @MarkAHershberger has the patch with the extension pending (https://gerrit.wikimedia.org/r/#/c/202629/), marked as WIP – what is left to do there?

This is related to the MW 1.25 release, but probably doesn't block it, so MW-1.25-release project should probably be removed?

matmarex writes:

This is related to the MW 1.25 release, but probably doesn't block it

I have a patch that is needed to allow extensions to replace
functionality that is being removed. I have time to focus this and
bring it to completion.

If I can get https://gerrit.wikimedia.org/r/#/c/207722/ merged, I'll be able to push finalize the extension. I *think* I've addressed Chad's issues there.

demon added a subscriber: demon.

Removing release blocker. Hook changes required landed and backported to REL1_25, so when the extension is finished it can support MW 1.25+.

https://gerrit.wikimedia.org/r/#/c/202629/ is active, mostly code style issues left AFAICT.

Prod added a comment.Jun 2 2015, 3:19 AM

I've updated my 1.24 wiki to 1.25.1 along with the HitCounters extension. I've updated to patch set 28.

On Special:Statistics, the Views total entry is only showing "1".

Does this enable the "NUMBEROFVIEWS" magic word again?

Ckoerner writes:

Does this enable the "NUMBEROFVIEWS" magic word again?

It does. Was that something you're using? You can see this exact
feature in action at http://testwiki.nichework.com/wiki/Main_Page just
under the "Main Page" heading. The wiki there is from a DB dump of
another wiki I run, so it has "real" hit counters.

@MarkAHershberger, Yep. I updated my test environment with HitCounters and see it working myself. 👍

Looks like we're on track for inclusion in the next 1.25.x release.

I've updated my 1.24 wiki to 1.25.1 along with the HitCounters extension. I've updated to patch set 28.
On Special:Statistics, the Views total entry is only showing "1".

Could you open a separate issue for this? Also, describe how you upgraded.

The big issue with hit counters wasn't philosophical, it was technical. The implementation was really rudimentary, with no granularity, often wrong stats if caching was used, and a performance penalty (writing to the database frequently).

I'm a bit disappointed that the new HitCounters extension doesn't seem to address any of these issues, but I'm quite glad this feature has been moved out of MediaWiki core. Maybe one day we'll have a proper view stats tool.

Change 202629 merged by jenkins-bot:
New HitCounters extension.

https://gerrit.wikimedia.org/r/202629

Change 218347 had a related patch set uploaded (by MarkAHershberger):
New HitCounters extension.

https://gerrit.wikimedia.org/r/218347

Change 218347 merged by jenkins-bot:
New HitCounters extension.

https://gerrit.wikimedia.org/r/218347

Need to request for project for hitcounters bug report for phabricator.

MarkAHershberger closed this task as Resolved.Jun 18 2015, 2:44 PM

This is done now.

Is there a task for bundling in the tarball?

Doint think so if your talking about hit counter. And not sure if there is one for bundling tarball either for other extensions.

Change 221059 had a related patch set uploaded (by Nemo bis):
Bundle HitCounters extension

https://gerrit.wikimedia.org/r/221059

Change 221347 had a related patch set uploaded (by Krinkle):
Allow extensions to set $wgDisableCounters.

https://gerrit.wikimedia.org/r/221347

Change 221347 merged by jenkins-bot:
Allow extensions to set $wgDisableCounters.

https://gerrit.wikimedia.org/r/221347

Change 221059 abandoned by Chad:
Bundle HitCounters extension

Reason:
I haven't seen much discussion other than the voices already chiming in on this patch. Looking at the last 30 days of extension downloads, it's the 51st most downloaded extension. The original request on mw.org has been sitting there for a year with zero input. I'm abandoning this.

https://gerrit.wikimedia.org/r/221059

Change 221059 restored by Nemo bis:
Bundle HitCounters extension

Reason:
There was no indication to users that more input would be needed. Please email mediawiki-l if the traditional consensus-based process is deemed insufficient and you need more !votes.

https://gerrit.wikimedia.org/r/221059

demon removed a subscriber: demon.Jan 27 2016, 4:55 PM
Nemo_bis rescinded a token.Jul 16 2016, 8:01 AM

Change 221059 abandoned by Chad:
Bundle HitCounters extension

Reason:
As I said before, there is no consensus for this. Nobody has ever asked for it other than the requestor and it's not a popular extension download at all.

https://gerrit.wikimedia.org/r/221059

Jeffmcneill added a subscriber: Jeffmcneill.EditedApr 19 2017, 3:37 AM

Just a comment in case people think they need this: Users like it, but that can end in gaming the system with page clicks/reloads for "favorite pages". PIWIK is an open source analytics package that can be installed on the same server (uses PHP), and works quite well. For admins needing to know use trends and navigation flow, this tool can provide a lot of useful data. https://piwik.org/