Page MenuHomePhabricator

[Epic] Reading Lists - Click tracking (JS) instrumentation
Open, Stalled, HighPublicGoal

Description

NOTE: you may be tempted to resolve this ticket, but please make sure that all the subtickets have been resolved and it has passed through a sprint board first, as we are using it to make sure we remember to do a full QA of instrumentation before we launch

Background

In T397532 we are planning to measure the usage of the new reading list feature on web. In order to do this, we need to implement click tracking instrumentation that measures the overall usage of this feature.

User story

As a product team, we need to make data-driven decisions of the direct of the reading list feature on web.

Design requirements

Instrumentation Workflow Reading List.jpg (540×960 px, 78 KB)
Instrumentation Workflow Reading List (1).jpg (540×960 px, 55 KB)
clicks on article viewclicks on reading list view

Requirements

  • A custom instrument is written to enable click tracking for the initial Reading list on web experiment
  • Implement the following instrumentation events:
  • Common contextual attributes for all events - stream configuration should capture these
- agent_client_platform
- agent_client_platform_family
- page_content_language
- page_namespace_id
- mediawiki_skin
- mediawiki.database
- performer.is_logged_in
- performer.is_temp
- performer.is_bot
- performer.edit_count_bucket
- performer.session_id
- dt
- meta.dt
  • Page load event - Whenever a page loads and the user is in the experiment
action: page_load
action_source: internal_referer / external_referer
  • Save/remove entry point clicks - When user clicks the bookmark button from either toolbar, sticky header or page tools.
action: click
action_subtype: save_to_reading_list / remove_from_reading_list
action_source:sticky_header / toolbar
action_context={article_count: <INT>}
  • Views of reading list from article page - User clicks to view reading list icon on the top of the page
action: click
action_subtype: view_reading_list
action_source: top_right
  • Views of reading list from on the "article saved" popup - User clicks on the 'view list' on the article saved popup
action: click
action_subtype: view_reading_list
action_source: article_saved_popup
  • Views of an article from the reading list - User clicks on an article link in the reading list
action: click
action_subtype: view_article
action_source:reading_list
action_context={article_count: <INT>}

Acceptance criteria

  • Add clear acceptance criteria.

Communication criteria

Add if this needs an announcement or discussion.

Rollback plan

Describe the rollback plan in production for this task if something goes wrong.

This task was created by Version 1.0.0 of the Reader Experience team task template using phabulous.

Event Timeline

Jdrewniak moved this task from Incoming to Needs refinement on the Reader Experience Team board.
Jdrewniak renamed this task from Reading Lists - Click tracking instrumentation to Reading Lists - Click tracking (JS) instrumentation.Aug 19 2025, 2:50 PM
Jdrewniak set the point value for this task to 8.Aug 20 2025, 5:33 PM

meeting notes: Given this is an 8, it would be good to explore the technical approach before starting this task.

Views of reading list from on the "article saved" popup - User clicks on the 'view list' on the article saved popup

Views of an article from the reading list - User clicks on an article link in the reading list

^ these parts of the task may depend on other tasks.


"Page load event" and "Save/remove entry point clicks" should be ready to work on next sprint.

Please refer to the spikes which have proof of concept patches that possibly could be used and polished:

https://phabricator.wikimedia.org/T402314

https://phabricator.wikimedia.org/T402946

Change #1187522 had a related patch set uploaded (by LorenMora; author: LorenMora):

[mediawiki/extensions/ReadingLists@master] Add source to locate bookmark click event

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

Change #1187523 had a related patch set uploaded (by LorenMora; author: LorenMora):

[mediawiki/skins/Vector@master] Copy mwListPageCount from toolbar to sticky header

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

Change #1187524 had a related patch set uploaded (by LorenMora; author: LorenMora):

[mediawiki/extensions/WikimediaEvents@master] Instrument ReadingListAB

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

Change #1187913 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/extensions/ReadingLists@master] Centralize reading list size

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

Change #1187523 abandoned by LorenMora:

[mediawiki/skins/Vector@master] Copy mwListPageCount from toolbar to sticky header

Reason:

Abondoning for different approach

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

Change #1187913 merged by jenkins-bot:

[mediawiki/extensions/ReadingLists@master] Centralize reading list size

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

Change #1187522 merged by jenkins-bot:

[mediawiki/extensions/ReadingLists@master] Add source to locate bookmark click event

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

Change #1187524 merged by jenkins-bot:

[mediawiki/extensions/WikimediaEvents@master] Instrument ReadingListAB

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

Ticket to be split into the three remaining workstreams:

  • Views of an article from the reading list
    • dependent on the page layout being confirmed?
  • Views of reading list from on the "article saved" popup
    • may need a spike, as preliminary efforts seem to indicate things don't work since the element isn't on the page when the instrumentation code runs
  • Common contextual attributes for all events
    • figure out what we're getting by default and make sure we're explicitly passing in the contextual attributes we need if they're not included by default
LMora-WMF changed the point value for this task from 8 to 0.Sep 17 2025, 5:29 PM
LMora-WMF subscribed.

Changing to 0 points as child tasks are now capturing all the work.

Note: we're gonna use this ticket for a full instrumentation QA once the subtickets are all closed out (as currently the import is commented out)

@SToyofuku-WMF is this ready for testing in prod? I've updated the description with test steps. In lieu of acceptance criteria let me know if what if the steps miss anything.

@Edtadros not yet ready for testing as far as I'm aware - we'll pull it into the sprint when we're ready for full instrumentation QA

Test steps look good though!! I believe contextual attributes would apply to all of the events, not just page load

SToyofuku-WMF changed the task status from Open to Stalled.Oct 7 2025, 7:21 PM

Stalled on all the subtasks being completed

Jdrewniak changed the subtype of this task from "Task" to "Goal".Oct 7 2025, 9:21 PM
Jdrewniak added a project: Epic.
Jdlrobson-WMF renamed this task from Reading Lists - Click tracking (JS) instrumentation to [Epic] Reading Lists - Click tracking (JS) instrumentation.Oct 8 2025, 3:45 PM
Jdlrobson removed the point value 0 for this task.
Jdlrobson subscribed.

Please create a subtask for QA.