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:
- How to create an instrument
- Instrumentation spec's D column
- proof of concept & docs.
Acceptance Criteria
WikimediaEvents
- Register the event stream
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.
Update
- T402966: Image Browsing: Create the UI for "images from other wikis" implements 2 new interactions, both to be instrumented
- We met with @jwang for a full spec & instrumented events review
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