Page MenuHomePhabricator

Make the AQS endpoints more usable for the ImpactModule extension
Open, HighPublic

Description

Background

As part of DE1.3.2 Impact + Dashboard, the Growth-Team intends to create an AQS-based version of the Impact module (see example). The main advantage here is avoiding the need to maintain a fairly complex infrastructure for analytics queries within MediaWiki. The Impact module is available on individual wikis; visiting the Impact module on enwiki should give enwiki-specific data (while a dewiki visit would show data about dewiki, and so on).

We have already reviewed the list of metrics we want to include in the Impact module with what is offered via Analytics Query Service. Details are available at T433352: Review metrics provided by the Impact module and available APIs (past conversation with Data-Platform is available in T414020). Based on our review, we have a couple of questions and couple of requests that would hopefully allow us to move forward.

Requests

Filling this within one task to make orienting easier (and since I'm not sure how to break down the work effectively). Let me know if I should be fill separate/specific subtasks for some of this!

Add per-project filtering to several endpoints

Given the ImpactModule should display wiki-specific data, we need to be able to filter the data on per-wiki basis. This includes the following endpoints:

Make the most-viewed pages for editors' edited pages available for last floating month

As of now, the List most-viewed pages for an editor's edited pages endpoint only allows downloading the data after a full month has passed since the user's first edit. This is practically unusable for ImpactModule's purposes – we want to motivate newcomers by telling them "hey, your edits were viewed by many people". If we only have this information after a month, the newcomer is long gone, and the motivation wouldn't work.

To make the information usable, we would need to have the data available for the last floating month (last 30 days, regardless of calendar month boundaries). Getting daily granularity (as previously discussed in T414020#11925837) wouldn't help, because the ImpactModule should display data for last N days (to be more meaningful; currently, N=60, but we are open to changing that), and merging daily granularity top-k most viewed articles into a floating monthly top-k most viewed articles is not possible (to order the articles, we would need to know how many times they were viewed on days  on which they were not among a user's most viewed articles).

Add Thanks data into the AQS

It would be nice if AQS included data about the number of thanks a specific user gave/received during a given period. Note that the example linked above only displays received thanks, but a similar moderator-oriented module will also include sent thanks.

Event Timeline

Adding to Needs Refinement so we can discuss.

Advice from Asana:

Prep Pantry will generally help us all agree on the requirements and priority for anything new that needs to be built.
My concrete advice here is to do a first high-level pass to split the metrics into "what can be used as-is from the Analytics API" (meaning, Growth can integrate the existing API) vs. "what new metrics are needed / what needs to be extended from the Analytics API" (and from here we go into Prep Pantry where we capture all details).

We refined the list of requirements async with @Michael. I think I reflected feedback he gave; unless anyone has any objections, I'll likely add Data-Engineering tomorrow and consider this task created.