Page MenuHomePhabricator

Instrument clicks to items in the image browser
Closed, InvalidPublic

Description

One way of doing this would be add the data-event-name HTML attribute to carousel images

The WikimediaEvents MW extension serves as a bridge between the image browser and A/B tests. It expects a specific HTML attribute to track clicks on relevant elements.
It doesn't seem compatible with Vue, and a simple attempt to hardcode the attribute in a HTML template didn't work.

T402020#11126056 provides an initial investigation.

Acceptance criteria

  • Define a Vue plugin that introduces event listeners for a given component
  • Add the data-event-name HTML attribute in CarouselItem's HTML template

Event Timeline

Is just the presence of the 'data-event-name’ sufficient, or should the Acceptance Criteria also include that click tracking for that element also works?

Is just the presence of the 'data-event-name’ sufficient, or should the Acceptance Criteria also include that click tracking for that element also works?

We will need more than just the data attribute in order for this to work correctly, since Vue adds and removes pieces to the DOM after the initial page load.

Jdlrobson-WMF renamed this task from Add the `data-event-name` HTML attribute to carousel images to Instrument clicks to items in the image browser.Sep 2 2025, 5:05 PM
Jdlrobson-WMF updated the task description. (Show Details)
Jdlrobson-WMF subscribed.

Marco to write a comment and decline this ticket.

This ticket is superseded by T403255: Instrument image browser's primary metric and T403259: Instrument image browsing interactions, which implement an alternative solution. Closing as invalid.