Page MenuHomePhabricator

UserInfoCard: Instrument the feature
Closed, ResolvedPublic

Description

Summary

In this task, we'll build the schema and instrument code needed to understand usage of the feature.

Background

  • This task overlaps with T386439: [Epic] UserInfoCard: Rollout and metrics monitoring
  • We want to instrument all the interactive components in the feature:
    • Clicks/taps to the icon button injected next to usernames
    • Clicks on links in the card, with ability to identify these clicks in a semantic way (e.g. to log a link click to en.wikipedia.org/wiki/Special:Contributions, but instead link-id=specialcontributions)
    • Enabling/disabling the feature.

User story

As a product owner, I want to understand which components in the user information card are used most often. I also want to understand how often the feature is used, and if the feature is used repeatedly.

Technical notes

  • We can use the metrics platform base schema with little or no modifications
  • We need to include the user ID in the instrumentation data, so that we can understand repeat usages, and so that we can also map outcomes (e.g. review card -> user is eventually blocked or has edit reverted)

Acceptance criteria

  • All interactions with the user information card are instrumented
  • Schema for the user reputation card interactions exists

Event Timeline

KColeman-WMF renamed this task from UserReputationCard: Instrument the feature to UserInfoCard: Instrument the feature.Mar 12 2025, 3:07 PM
KColeman-WMF updated the task description. (Show Details)
kostajh added subscribers: Mimurawil, SimoneThisDot.

@Mimurawil @SimoneThisDot for this one, please refer to the implementation in Extension:ReportIncident, because this will be very similar. There is not yet a schema but you can still add the logging code in a patch in the meantime. Here are some files to reference:

Mimurawil changed the task status from Open to In Progress.Jun 16 2025, 7:00 PM

Change #1159626 had a related patch set uploaded (by Mimurawil; author: Mimurawil):

[operations/mediawiki-config@master] Configure instrument for CheckUser - UserInfoCard

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

@kostajh asked me to review the contextual attributes. I'd add agent_client_platform_family to the list, since that makes it easy to identify desktop/mobile web usage. That's all, looks good to me!

@kostajh asked me to review the contextual attributes. I'd add agent_client_platform_family to the list, since that makes it easy to identify desktop/mobile web usage. That's all, looks good to me!

Thanks! Added to the list.

Change #1160296 had a related patch set uploaded (by Mimurawil; author: Mimurawil):

[mediawiki/extensions/CheckUser@master] UserInfoCard: Add instrumentation for UserInfoCard feature

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

Just noting here that I understand this instrument + schema to be "low risk" per https://foundation.wikimedia.org/wiki/Legal:Data_Collection_Guidelines and internal guidance which says:

If you opt out of collecting User-Agent and you are not collecting IP address, you can include username/user ID and have the activity classified as Low Risk.

Change #1159626 merged by jenkins-bot:

[operations/mediawiki-config@master] Configure instrument for CheckUser - UserInfoCard

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

Mentioned in SAL (#wikimedia-operations) [2025-06-19T20:04:31Z] <kharlan@deploy1003> Started scap sync-world: Backport for [[gerrit:1159626|Configure instrument for CheckUser - UserInfoCard (T386440)]], [[gerrit:1161581|Set category collation to uca-pl-u-kn for plwikiquote (T397466)]]

Mentioned in SAL (#wikimedia-operations) [2025-06-19T20:06:43Z] <kharlan@deploy1003> kharlan, msz2001, mimurawil: Backport for [[gerrit:1159626|Configure instrument for CheckUser - UserInfoCard (T386440)]], [[gerrit:1161581|Set category collation to uca-pl-u-kn for plwikiquote (T397466)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2025-06-19T20:15:02Z] <kharlan@deploy1003> Finished scap sync-world: Backport for [[gerrit:1159626|Configure instrument for CheckUser - UserInfoCard (T386440)]], [[gerrit:1161581|Set category collation to uca-pl-u-kn for plwikiquote (T397466)]] (duration: 10m 30s)

Change #1160296 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] UserInfoCard: Add instrumentation for UserInfoCard feature

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