Page MenuHomePhabricator

Instrument image browsing interactions
Closed, ResolvedPublic5 Estimated Story Points

Description

We need to add instrumentation to various parts of the Image Browsing UI. We want to log events based on user interactions in a way that aligns with the instrumentation spec for this feature.

The following resources will be useful:

Acceptance Criteria
WikimediaEvents
Detail View

The instrumentation of detail view's buttons, toggles, and links enables the collection of image browser's engagement interactions.
We'd like to track the following interactions:

  • detail view's buttons - full screen, share, view on Commons, download
  • caption's eventual more/less toggle
  • caption's eventual wikilinks

Instrument detail view's

    • full screen button instrument
    • share button instrument
    • Commons button instrument
    • download button instrument
  • Implement caption's more/less toggle instrument
  • Implement caption's wikilinks instrument (requires setting up /tearing down event listeners for all links present in the dynamic HTML caption content)
Visual Table of Contents

Implement visual table of contents'

  • View in article button instrument
  • image click instrument
Local Testing

To test that events are being fired correctly, developers should do the following in their local wiki environment.

NOTE: moved to the extension's README.

Update

These resulted in the following additional acceptance criteria:

  • the Back to article button should fire the same event as detail view's X (close) button, as per spec's cell D16
  • instrument click on images from other wikis
  • update the stream configuration to not collect HTTP user agents

Event Timeline

egardner renamed this task from Instrument image browser detail view's engagement interactions to Instrument image browsing interactions.Sep 10 2025, 5:08 PM
egardner updated the task description. (Show Details)
egardner set the point value for this task to 5.
mfossati changed the task status from Open to In Progress.Sep 11 2025, 3:21 PM
mfossati moved this task from Committed to Doing on the Reader Growth Team (Sprint 5) board.

Change #1188877 had a related patch set uploaded (by Eric Gardner; author: Eric Gardner):

[mediawiki/extensions/ReaderExperiments@master] ImageBrowsing: Use a Vue Plugin for instrumentation

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

Change #1187413 had a related patch set uploaded (by Marco Fossati; author: Marco Fossati):

[operations/mediawiki-config@master] ReaderExperiments' ImageBrowsing stream configuration

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

Change #1189264 had a related patch set uploaded (by Marco Fossati; author: Marco Fossati):

[mediawiki/extensions/ReaderExperiments@master] Image Browsing: instrument all interactions

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

Moving to code review right now. TODOs are about tests and README, so they don't affect the core patch.

Change #1188877 merged by jenkins-bot:

[mediawiki/extensions/ReaderExperiments@master] ImageBrowsing: Use a Vue Plugin for instrumentation

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

Change #1187413 merged by jenkins-bot:

[operations/mediawiki-config@master] ReaderExperiments' ImageBrowsing stream configuration

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

Mentioned in SAL (#wikimedia-operations) [2025-09-24T12:39:31Z] <mfossati@deploy1003> Started scap sync-world: Backport for [[gerrit:1187413|ReaderExperiments' ImageBrowsing stream configuration (T403259)]]

Mentioned in SAL (#wikimedia-operations) [2025-09-24T12:45:56Z] <mfossati@deploy1003> mfossati: Backport for [[gerrit:1187413|ReaderExperiments' ImageBrowsing stream configuration (T403259)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2025-09-24T13:03:24Z] <mfossati@deploy1003> Finished scap sync-world: Backport for [[gerrit:1187413|ReaderExperiments' ImageBrowsing stream configuration (T403259)]] (duration: 23m 53s)

Change #1191144 had a related patch set uploaded (by Marco Fossati; author: Marco Fossati):

[operations/mediawiki-config@master] Fix typo in ReaderExperiments' ImageBrowsing stream configuration

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

Change #1191144 merged by jenkins-bot:

[operations/mediawiki-config@master] Fix typo in ReaderExperiments' ImageBrowsing stream configuration

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

Mentioned in SAL (#wikimedia-operations) [2025-09-24T20:18:54Z] <mfossati@deploy1003> Started scap sync-world: Backport for [[gerrit:1191144|Fix typo in ReaderExperiments' ImageBrowsing stream configuration (T403259)]]

Mentioned in SAL (#wikimedia-operations) [2025-09-24T20:25:18Z] <mfossati@deploy1003> mfossati: Backport for [[gerrit:1191144|Fix typo in ReaderExperiments' ImageBrowsing stream configuration (T403259)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2025-09-24T20:31:35Z] <mfossati@deploy1003> Finished scap sync-world: Backport for [[gerrit:1191144|Fix typo in ReaderExperiments' ImageBrowsing stream configuration (T403259)]] (duration: 12m 40s)

Moving to code review. The two remaining clicks that need instrumentation can come in a separate patch as soon as T402966: Image Browsing: Create the UI for "images from other wikis" is merged.

Change #1192138 had a related patch set uploaded (by Marco Fossati; author: Marco Fossati):

[operations/mediawiki-config@master] ReaderExperiments' ImageBrowsing: don't collect the HTTP user agent

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

Change #1192138 merged by jenkins-bot:

[operations/mediawiki-config@master] ReaderExperiments' ImageBrowsing: don't collect the HTTP user agent

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

Mentioned in SAL (#wikimedia-operations) [2025-09-30T13:05:36Z] <mfossati@deploy2002> Started scap sync-world: Backport for [[gerrit:1192138|ReaderExperiments' ImageBrowsing: don't collect the HTTP user agent (T403259)]]

Mentioned in SAL (#wikimedia-operations) [2025-09-30T13:12:21Z] <mfossati@deploy2002> mfossati: Backport for [[gerrit:1192138|ReaderExperiments' ImageBrowsing: don't collect the HTTP user agent (T403259)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2025-09-30T13:18:33Z] <mfossati@deploy2002> Finished scap sync-world: Backport for [[gerrit:1192138|ReaderExperiments' ImageBrowsing: don't collect the HTTP user agent (T403259)]] (duration: 12m 56s)

Change #1192578 had a related patch set uploaded (by Marco Fossati; author: Marco Fossati):

[operations/mediawiki-config@master] ReaderExperiments' ImageBrowsing: use edge uniques

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

Change #1192578 merged by jenkins-bot:

[operations/mediawiki-config@master] ReaderExperiments' ImageBrowsing: use edge uniques

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

Mentioned in SAL (#wikimedia-operations) [2025-10-06T13:08:14Z] <mfossati@deploy2002> Started scap sync-world: Backport for [[gerrit:1192578|ReaderExperiments' ImageBrowsing: use edge uniques (T403259)]]

Mentioned in SAL (#wikimedia-operations) [2025-10-06T13:14:57Z] <mfossati@deploy2002> mfossati: Backport for [[gerrit:1192578|ReaderExperiments' ImageBrowsing: use edge uniques (T403259)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2025-10-06T13:19:46Z] <mfossati@deploy2002> Finished scap sync-world: Backport for [[gerrit:1192578|ReaderExperiments' ImageBrowsing: use edge uniques (T403259)]] (duration: 11m 32s)

Change #1189264 merged by jenkins-bot:

[mediawiki/extensions/ReaderExperiments@master] ImageBrowsing: instrument all interactions

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

I can confirm that instrumentation is logging events locally for all of the specified interactions in this task.

🎉 Thank you @egardner for the thorough code review iterations!