Research talk:GuidedTour usage

From Meta, a Wikimedia project coordination wiki
Jump to navigation Jump to search

Work log[edit]

Monday, February 10th[edit]

Matt and [Steven] want to know how many wikis have local guided tours. The easiest way to get this should be a script to search the MediaWiki namespace for 'guidedtour' etc. on all wikis where it is enabled.

So, I have two goals:

  1. Determine which Wikis have had a minimum amount of GuidedTour usage
  2. Quantify the GuidedTour usage per Wiki

It would be nice if I could draw some attention to some of the most used tours as well.


I can make use of Schema:GuidedTour to identify use of GuidedTours. I'd like to minimize counting tours that were never used. I think that making sure that at least two users registered tour events should be a pretty good way to filter.

OK. So query time. This should be relatively straightforward.

SELECT wiki, COUNT(*) 
FROM (
    SELECT 
        wiki, 
        event_tourName, 
        COUNT(distinct event_userId) AS users 
    FROM GuidedTour_5222838 
    GROUP BY 1,2
) as wiki_tour_users 
WHERE users >= 2
GROUP BY 1;
result
+--------------+----------+
| wiki         | COUNT(*) |
+--------------+----------+
| astwiki      |        1 |
| cawiki       |        7 |
| dewiki       |        3 |
| enwiki       |       16 |
| frwiki       |        3 |
| hewiki       |        1 |
| itwiki       |        2 |
| outreachwiki |        1 |
| plwiki       |        1 |
| ruwiki       |        1 |
| svwiki       |        1 |
| testwiki     |        5 |
| ukwiki       |        1 |
| wiki         |        6 |
+--------------+----------+
14 rows in set (45.64 sec)

"testwiki" and "wiki" represent test environments and should probably be discounted. Therefor, it looks like 12 wikis have tours that were at least tested by more than one user. Just for curiosity, I dropped the constraint on that least two users need to use the tour to see how it changes the count.

result
+-----------------+----------+
| wiki            | COUNT(*) |
+-----------------+----------+
| astwiki         |        1 |
| cawiki          |        8 |
| commonswiki     |        1 |
| dewiki          |        3 |
| enwiki          |       16 |
| eswiki          |        1 |
| fawiki          |        1 |
| frwiki          |        3 |
| hewiki          |        1 |
| itwiki          |        3 |
| kowiki          |        1 |
| mediawikiwiki   |        2 |
| mwlwiki         |        1 |
| outreachwiki    |        2 |
| plwiki          |        1 |
| ruwiki          |        1 |
| svwiki          |        1 |
| testwiki        |        7 |
| this_is_my_wiki |        1 |
| ukwiki          |        1 |
| viwiki          |        3 |
| wiki            |        8 |
+-----------------+----------+
22 rows in set (45.55 sec)

There we get 19 wikis after removing apparent test wikis. --Halfak (WMF) (talk) 22:04, 10 February 2014 (UTC)


So, it sounds like most tours don't get logged. I'm going to need to figure out which wikis have tours some other way. It looks like I can search for all pages in ns=8 ("MediaWiki") that begin with "GuidedTour-tour-" and end with ".js". This will gather all of the "community created" tours, but it will also gather tours that aren't finished or otherwise don't work. That will have to be good enough.

Here's my list of tours with the extension enabled:

wikis
  • astwiki
  • be_x_oldwiki
  • bewiki
  • cawiki
  • commonswiki
  • dewiki
  • enwiki
  • eswiki
  • fawiki
  • frwiki
  • glwiki
  • hewiki
  • huwiki
  • itwiki
  • kowiki
  • mediawikiwiki
  • mkwiki
  • mswiki
  • mwlwiki
  • nlwiki
  • outreachwiki
  • plwiki
  • ptwiki
  • ptwikibooks
  • ruwiki
  • svwiki
  • ukwiki
  • viwiki

Here's the query:

SELECT page_title FROM page WHERE page_namespace = 8 AND page_title LIKE 'Guidedtour-tour-%.js'

And the results all fancy formatted with links:

Wiki Tour Comments
enwiki en:MediaWiki:Guidedtour-tour-BeBoldStudent.js
en:MediaWiki:Guidedtour-tour-CitationsStudent.js
en:MediaWiki:Guidedtour-tour-finddpla.js
en:MediaWiki:Guidedtour-tour-studentsandbox.js
en:MediaWiki:Guidedtour-tour-twa1.js
en:MediaWiki:Guidedtour-tour-twa2.js
en:MediaWiki:Guidedtour-tour-twa3.js
en:MediaWiki:Guidedtour-tour-twa4.js
en:MediaWiki:Guidedtour-tour-twa5.js
en:MediaWiki:Guidedtour-tour-twa6.js
en:MediaWiki:Guidedtour-tour-twa7.js
commonswiki commons:MediaWiki:Guidedtour-tour-GTA1.js
commons:MediaWiki:Guidedtour-tour-GTA2.js
commons:MediaWiki:Guidedtour-tour-GTA3.js
commons:MediaWiki:Guidedtour-tour-GTA5.js
commons:MediaWiki:Guidedtour-tour-nominatefordeletion.js
dewiki de:MediaWiki:Guidedtour-tour-test2.js
fawiki fa:MediaWiki:Guidedtour-tour-basics.js
fa:MediaWiki:Guidedtour-tour-studentsandbox.js
outreachwiki outreach:MediaWiki:Guidedtour-tour-CitationsStudent.js
outreach:MediaWiki:Guidedtour-tour-mytest.js
outreach:MediaWiki:Guidedtour-tour-sandbox.js
ptwiki pt:MediaWiki:Guidedtour-tour-contribs.js
pt:MediaWiki:Guidedtour-tour-patrol.js

--Halfak (WMF) (talk) 23:12, 10 February 2014 (UTC)

Discussion[edit]