As part of the work on MinT for Wikipedia Readers MVP (T359072), an schema for instrumentation has been defined using the new data platform. This ticket proposes to implement the instrumentation for a set of key events. You can check the documentation for more details on how to use the new platform in the implementation.
Form the designed schema (T341185) the key events are the following:
- session initiation
- users searches for a topic
- users selects an article
- user clicks to view to automatic translation
- user clicks to view human generated content
- user closes the automatic translation view
Derive Requirement
Implement the instrumentation for key user events related to the MinT MVP for Wikipedia Readers using the new data platform. The key events to be tracked are:
Session initiation
User searches for a topic
User selects an article
User clicks to view automatic translation
User clicks to view human-generated content
User closes the automatic translation view
All events should log the required properties to ensure proper tracking and analytics.
BDD
Feature: MinT MVP for Wikipedia Readers instrumentation
Scenario: Session initiation Given a user visits the Wikipedia site When the user lands on the automatic translation page Then the session initiation event should be logged Scenario: User searches for a topic Given the user is on the automatic translation page When the user searches for a topic Then the "search_topic" event should be logged Scenario: User selects an article Given the user has searched for a topic When the user selects an article from the search results Then the "select_article" event should be logged Scenario: User clicks to view automatic translation Given the user has selected an article When the user clicks to view the automatic translation Then the "view_automatic_translation" event should be logged Scenario: User clicks to view human-generated content Given the user is on the automatic translation page When the user clicks to view the human-generated content Then the "view_human_content" event should be logged
Test Steps
Pre-requisite:
-Ensure debug logs are enabled by executing the following code in the browser developer console:
javascript
Copy code:
mw.loader.using( 'mediawiki.api' ).then( function () { new mw.Api().saveOption( 'eventlogging-display-web', '1' ); });
Test Case 1: Session initiation
Visit a Wikipedia site (e.g., https://es.wikipedia.org).
Open the Automatic Translation special page.
Expected Result:
✅❓❌⬜ AC1: Confirm that a "session initiation" event is logged in the console, containing the relevant session properties.
Test Case 2: User searches for a topic
On the Automatic Translation page, search for a topic.
Expected Result:
✅❓❌⬜ AC2:Confirm that a "search_topic" event is logged in the console, including properties like action: "search", action_source: "topic_search".
Test Case 3: User selects an article
After searching for a topic, select an article from the search results.
Expected Result:
✅❓❌⬜ AC3:Confirm that a "select_article" event is logged, with properties like action: "click", action_source: "article_selection".
Test Case 4: User clicks to view automatic translation
After selecting an article, click to view the automatic translation.
Expected Result:
✅❓❌⬜ AC4:Confirm that a "view_automatic_translation" event is logged, including properties such as action: "click", action_source: "automatic_translation_card".
Test Case 5: User clicks to view human-generated content
Click on the option to view human-generated content (if available).
Expected Result:
✅❓❌⬜ AC5:Confirm that a "view_human_content" event is logged, with properties like action: "click", action_source: "human_content".
QA Results - ES Automatic Translation PROD
AC | Status | Details |
---|---|---|
1 | ✅ | T363685#10184753 |
2 | ✅ | T363685#10184753 |
3 | ✅ | T363685#10184753 |
4 | ✅ | T363685#10184753 |
5 | ❌ | T363685#10184753 |