Page MenuHomePhabricator

Review metrics provided by the Impact module and available APIs
Closed, ResolvedPublic3 Estimated Story Points

Description

This is a follow-up to @Sgs's work from T414020: Impact Module: Investigate using Wikimedia Analytics API. The goal of this task is to create a table that shows for every metric offered by GrowthExperiments-ImpactModule (determined as visible by the end user at Special:Impact):

  • the name of the metric,
  • definition of what it means,
  • link to a Wikimedia Analytics API that can compute it (if it exists),
  • a proposed decision whether that metric would be included in the MVP of the new Impact module.

This would be the basis to start migrating Impact module metrics to their new home.

Result

Current metrics

Metric nameDefinitionCurrent technical limitations (*)
EditcountValue of user_editcountNone
Thanks receivedNumber of thanks received via ThanksCapped to 1,000 thanks
Last editRelative timestamp of the user's last edit in any namespaceNone
Longest streakLongest editing streak of the userOnly evaluated on the last 1,000 edits
Edit histogramHistogram of edits in the last 60 daysOnly evaluated on the last 1,000 edits
Total views on articles editedTotal number of pageviews from last 60 days on articles the user editedOnly evaluated on the last 1,000 edits
Histogram of pageviewsPer-day number of pageviews the user edited in the last 60 daysOnly evaluated on the last 1,000 edits
Most 5 viewed articlesTop 5 articles with the most visits (from articles the user edited in the last 60 days)Only evaluated on the last 1,000 edits

(*) Technical limitations describe current behaviour of Special:Impact. Those limitations should be lifted if possible.

Available data sources

NoNameProvider (AQS / MW)Notes/Limitations
1Total editcountMWAlso available as CentralAuthEditCounter::getCount() for global data access; sufficiently trivial to call
2Last edit timestampMWUserEditTracker::getLatestEditTimestamp() should be computationally trivial (similar to an AQS call); no global equivalent
3Thanks received/givenMWFairly complex query, likely should be moved to AQS if we want to keep it
4Edit count per dayAQSGlobal-only as of now; per-wiki filter should be trivial to add (T414020#11925837)
5Page views for top-viewed articlesAQSGlobal only as-of now; project filter is likely to be addable "if napkin math allows" (T414020#11925837); displays data only after the month is complete (getting daily data "might not be possible")
6Page views for userAQSGlobal-only as of now; uncertain if we can add filtering by project

Possible paths forward

To be finished global description

Option A: Global module

The global module would include data computed across all Wikimedia projects (resulting in exactly the same data regardless of the project the impact module would be viewed from).

Can be included?Metric nameDefinitionNotes/justification
EditcountValue of user_editcountAvailable in data source no 1
🚫Thanks receivedNumber of thanks received via ThanksComputation via MW is possible, but likely over the "AQS threshold" (see open questions)
🚫Last editRelative timestamp of the user's last edit in any namespaceGlobal data is unavailable both in MW and in AQS
Longest streakLongest editing streak of the userComputeEditingStreaks::getLongestEditingStreak can be applied to data source no 4
Edit histogramHistogram of edits in the last 60 daysAvailable in data source no 4
Total views on articles editedTotal number of pageviews from last 60 days on articles the user editedAvailable from data source 6 (sum of the row below)
Histogram of pageviewsHistogram of articles the user edited in the past 60 daysAvailable as data source 6
✅ ⚠Most 5 viewed articlesTop 5 most viewed articles on any project (updated monthly)Available as data source 5
Option B: Local module

The local module would include data computed for the specific Wikimedia project (resulting in different impact modules for each project it is viewed from).

Can be included?Metric nameDefinitionNotes/justification
EditcountValue of user_editcountAvailable in data source no 1
🚫Thanks receivedNumber of thanks received via ThanksComputation via MW is possible, but likely over the "AQS threshold" (see open questions)
Last editRelative timestamp of the user's last edit in any namespaceAvailable in data source 2
With DPE supportLongest streakLongest editing streak of the userPer-project filtering needs to be added by DPE to data source no 4; then ComputeEditingStreaks::getLongestEditingStreak can be applied
With DPE supportEdit histogramHistogram of edits in the last 60 daysPer-project filtering needs to be added by DPE to data source no 4
With DPE supportTotal views on articles editedTotal number of pageviews from last 60 days on articles the user editedSum of the row below (possibility of per-project data was not confirmed yet)
With DPE supportHistogram of pageviewsHistogram of articles the user edited in the past 60 daysPer-project filtering needs to be added by DPE to data source no 6 (possibility of this was not confirmed yet)
With DPE support ⚠Most 5 viewed articlesTop 5 viewed articles the user edited on that project (updated monthly)Per-project filtering needs to be added by DPE to data source no 5

Open questions

For DPE

All of those questions will be answered via T433983: Make the AQS endpoints more usable for the ImpactModule extension and its subtasks.

  • Is it possible to add Thanks data into AQS?
  • Is it reasonable to add filtering-by-project to the per-user page views dataset in AQS?
  • Can we compute Page views for top-viewed articles for the last floating month rather than for the last calendar month? Does this depend on whether project filtering is available?
For Growth
  • (PM) Would Product & Design (in Growth) be OK with having a global-only Impact module?
    • Answer: No, we want local stats.
  • (Engineers) In the new Impact module, should non-AQS data lookups be allowed? If so, to what extent?

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Urbanecm_WMF triaged this task as Unbreak Now! priority.Jul 28 2026, 9:36 AM
Urbanecm_WMF lowered the priority of this task from Unbreak Now! to High.
Urbanecm_WMF moved this task from Inbox to Estimated tasks backlog on the Growth-Team board.
Urbanecm_WMF moved this task from Estimated tasks backlog to Up next Sprint on the Growth-Team board.

Change #1319837 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@master] UserImpact: Fix stale doc comments about namespace scope

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

Change #1319837 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] UserImpact: Fix stale doc comments about namespace scope

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

Notes from today's research:

  • To support all impact data metrics, we need data about: last edit timestamp, thanks count, edit count per day, page views for top viewed articles and page views per user.
  • AQS has all data except last edit timestamp and thanks, but only globally. Top viewed articles have info about wiki, but we might not have top 5 articles on every wiki the user edited.
  • DPE said adding wiki_id filter is:
    • trivial for the edit counts
    • likely possible for top ranking pages
    • for adding to per user page views, the difficulty is unknown.
  • It is doable to create new Impact module that would have data globally across all wikis. For a global Impact module that has all non-trivial lookups AQS-backed, thanks data would be the only missing thing. Technically, edit count would be also missing, but that is trivial-enough to do in MediaWiki, so we might not need AQS endpoint for that.
  • We don't know:
    • if it is possible to add thanks data into AQS,
    • if it is possible to add project filtering to per-user page views dataset,
    • if Product/Design would be happy with a global-only Impact module.
    • to which extent would Engineering want to allow non-AQS data lookups.

Currently putting conclusions/options into the task's description (still WIP).

No objections, resolving.