Page MenuHomePhabricator

Enable analytics instruments to subscribe to WikiLove giving and receiving
Closed, ResolvedPublic

Description

Brief summary/reminder of how WikiLove works: When the extension is installed & enabled, logged-in users see a ❀️ button on User pages that they can click to start leaving a WikiLove message on the User's Talk page. Those messages (revisions) are tagged with wikilove.

We need a way of counting how many WikiLove messages a subject of an experiment gave or received during the experiment, as that contributes to Average contributor engagement count.

The cleanest way to do would be similar to T437053: Enable analytics instruments to subscribe to thanks (giving and receiving), where thanking emits a domain event and then when we instrument an experiment it can subscribe to that domain event and send thanks_given (if thanker is enrolled) and thanks_received events (if thankee is enrolled). We would update Ext:WikiLove to emit domain events and then similarly have experiment instrumentation subscribe and send wikilove_given / wikilove_received events for giver/recipient if they're enrolled in the experiment.

@Catrope confirms:

this will be very straightforward. All WikiLove submissions go through a dedicated API endpoint (api.php?action=wikilove, in ApiWikiLove.php) and that code is aware of whether the edit succeeded and has the revid of the new edit, so it should be able to emit events

AC

  • Ext:WikiLove emits a domain event that includes WikiLove giver and recipient

Event Timeline

mpopov added subscribers: OBenhmida, VPuffetMichel.

@VPuffetMichel @OBenhmida: Hi, I am filing this task for Connection team because Ext:WikiLove is not owned or maintained by anyone and this is needed for Connection team's DE 1.2 experiments.

Interesting! BTW, we are actively working on T434143: Capture relevant mediawiki tags changes in event stream(s)

Those messages (revisions) are tagged with wikilove.

So, FWIW, we will have an 'evergreen instrument; in which WikiLove revisions can be counted.

Oh, but wait, there's more?

https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/WikiLove/+/refs/heads/master/includes/ApiWikiLove.php#139

https://www.mediawiki.org/wiki/Extension:WikiLove#Data_storage

This is stored in both tags and in a table? Huh okay.

(This comment isn't suggesting a change in direction, just an FYI)

@mpopov I moved it to our board and @Daimona can pick it up next time he needs a task.

Change #1351992 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/WikiLove@master] Emit a domain event upon sending WikiLove

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

Ext:WikiLove emits a domain event that includes WikiLove giver and recipient

βœ… Verified by registering a test listener.

Change #1351992 merged by jenkins-bot:

[mediawiki/extensions/WikiLove@master] Emit a domain event when a user receives WikiLove

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