Page MenuHomePhabricator

Add page views graph(s) to MediaWiki's info action for Wikimedia wikis
Closed, ResolvedPublic

Assigned To
Authored By
MZMcBride
Oct 23 2012, 9:28 PM
Referenced Files
F3208808: pvi_info.png
Jan 7 2016, 10:51 AM
F3208810: pvi_chart.png
Jan 7 2016, 10:51 AM
Tokens
"Piece of Eight" token, awarded by whym."Like" token, awarded by Krenair."Piece of Eight" token, awarded by Pine."Like" token, awarded by Shizhao.

Description

It would be nice to have a graph/graphs of page views over time in MediaWiki's info action.

T63250: Redesign (prettify) MediaWiki's info action

Details

Reference
bz41327

Related Objects

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 22 2014, 1:10 AM
bzimport set Reference to bz41327.
bzimport added a subscriber: Unknown Object (MLST).

I talked to David S. about this earlier today. The problem currently is that this data simply isn't available (yet). The analytics infrastructure simply isn't there (yet!). I think we'll see a usable API by the end of 2013.

In the meantime, this gives us a bit over a year to get the feature request we do already have data for (bug 41329, "Add edit history graph(s) to MediaWiki's info action") implemented nicely (sanely). :-) This bug is going to be open for a bit, even though it's not really directly actionable right now.

Well, there's no way this can be done on server-side, because that would mess up Squid caching completely. The only option would be to some sort of JavaScript that reports back to the server, which would then enqueue a Job. I would guess the actual DB update would only occur after a certain number of views. The only problem is that jobs are stored in the database, so it would mean a query anyway, so there may just have to be a separate caching mechanism.

I took a stab at building this today (local wiki hacked up to show en.wp page views):

pvi_info.png (1×1 px, 231 KB)

pvi_chart.png (1×1 px, 242 KB)

Preliminary code is now in the WikimediaPageViewInfo extension in gerrit.

Jdforrester-WMF renamed this task from Add page views graph(s) to MediaWiki's info action to Add page views graph(s) to MediaWiki's info action for Wikimedia wikis.Feb 4 2016, 11:44 PM
Jdforrester-WMF removed a subscriber: wikibugs-l-list.

The Wikimedia-Hackathon-2016 starts tomorrow and this task is featured at T119703. We want to use T130776: Wikimedia Hackathon 2016 Opening Session to promote these projects and help recruiting volunteers to work for them.

If this task is ripe for hackathon work, please follow these instructions. If it is not ready, remove it from T119703 in order to avoid volunteers' frustration. Thank you!

Possible improvements: T160243: Use non smoothed style for PageViewInfo graph and showing the graph without the extra click (compare to Commons which uses a Graph + system message hack to do that).

and showing the graph without the extra click

Or at least make the graph more discoverable. I'm not sure how, other than by embedding it directly. Perhaps a button?

Why is the graph not embedded directly into the page? Maybe like a thumbnail sized-version and clicking it can open a larger view?

@Niharika: I think it's to avoid constantly invalidating the squid caches, although I wonder how we're avoiding that with including the total in the page. Seems like it would be just as problematic.

I think right now it is pretty obscure. It's not very intuitive that clicking the total pageviews count would pop up the graph.

Varnish ignores almost everything that has a query string.

$ curl -vs 'https://en.wikipedia.org/w/index.php?title=Main_Page&action=info' |& grep Cache-Status
< X-Cache-Status: pass

There is no performance difference whatsoever, it was probably just a design decision (as in: no one gave it too much thought).

In T43327#3120423, @Tgr wrote:

There is no performance difference whatsoever, it was probably just a design decision (as in: no one gave it too much thought).

This.

Legoktm reassigned this task from Legoktm to Tgr.

I'm closing this as resolved, since the functionality is enabled and available (and @Tgr did most of the heavy lifting at the end!). While it's not perfect, specific enhancement requests should be tracked in the PageViewInfo project.