Background
With reference to the Instrumentation Spec and Parent Ticket, this task is for implementing a click event for when the user clicks on a link to an article from their reading list Special page.
Design requirements
Requirements
Implement the following instrumentation events:
- 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>}Requirement
Scope: Desktop web (Vector 2022) and mobile web (Minerva).
- Implement a click instrumentation event for when a user clicks on an article link from their Reading List (Special:ReadingLists).
- Event parameters:
- action: click
- action_subtype: view_article
- action_source: reading_list
- action_context: { article_count: <INT> }
- The event must trigger each time the user clicks an article in the Reading List.
- The event must include the correct contextual attributes defined in the instrumentation spec (e.g., page content language, skin, session ID, etc.).
- No duplicate or missing events should occur on repeated clicks.
BDD
Feature: Instrumentation for clicking article links in Reading List
Scenario: User clicks an article link from Reading List
Given I am on the Special:ReadingLists page
And I have one or more saved articles
When I click on any article link in my Reading List
Then an instrumentation event is logged with:
| action | click |
| action_subtype | view_article |
| action_source | reading_list |
| action_context | {article_count: <INT>} |Test Steps
Test Case 1: Verify view_article click event
- Log in as a user with saved articles in their Reading List.
- Open Special:ReadingLists.
- Open browser DevTools → Network tab → filter for eventlogging or instrumentation endpoint.
- Click on any article link in the Reading List.
- AC1: A click event is logged with action: click.
- AC2: The event contains action_subtype: view_article and action_source: reading_list.
- AC3: The event includes action_context: {article_count: <INT>} representing the number of saved articles.
- AC4: Only one event fires per click, with no duplicates.
QA Results - Prod
| AC | Status | Details |
|---|---|---|
| 1 | ❌ | T405002#11343044 |
| 2 | ❌ | T405002#11343044 |
| 3 | ❌ | T405002#11343044 |
| 4 | ❌ | T405002#11343044 |
