As part of the instrumentation for the Reading Lists experiment T397532, we want to log thethe** total amountnumber of articles that a user saves** throughout the experiment.
After discussing this metrics with the Reader Experience team engineers & product analytics ([[ https://docs.google.com/document/d/1U74OY3COTXFo4ozEs4nkFW6d5vpGEEAuP1kus_TH9JU/edit?tab=t.0 | meeting notes ]]), we decided the most performant and stable way of logging this metrics would be by sending an eventLogging event whenever an API add/delete event occurs.
The event can be sendWe discussed different options of how to send this data. Client-side, in browser, we don't have access to the users total number of saved articles, so instead, we opted to send this event from PHP in the Reading List extension when the e. [[ https://wikitech.wikimedia.org/wiki/Experiment is enabled.tation_Lab/PHP_API | Experiment Lab PHP API ]].
=== User story
//As a product team, we want to know how many articles users save during this experiment.//
---
== Requirements
When someone is bucketed for the Reading list experiment,{F65790231}
Whenever someone clicks the bookmark icon, we want to log an event containing the total number of pages they have saved.
User flow
1. A user is bucketed into the experiment
2. They save an article
3. That action triggers an API call.
4. we want to log an event from the Reading list extension that sends that users total amount of saved articlesWhen that API call is triggered, whenever the add or remove an articlee enqueue an eventLogging event in the backend after that event is saved.
* That eventLogging event logs the users total number of saved pages.
- [[ https://docs.google.com/presentation/d/18G3jExkwKo9iNI35KrppcDVoAz9NjQDb4J0463RisdA/edit?slide=id.g37524e7e1e2_0_0#slide=id.g37524e7e1e2_0_0 | Instrumentation workflow ]]
- [[ https://docs.google.com/document/d/1gsBpCQXFz3aCgidMBYkzijtnaaHq5b8yf-zRENXmIfc/edit?tab=t.0 | Measurement plan ]]
- [[ https://docs.google.com/spreadsheets/d/1zbz52jUbSGteSUvNmZBlKaGXWJUf9pRnbARz1wtKP9M/edit?gid=0#gid=0 | Instrumentation spec ]]
=== Acceptance criteria
Since this event will be sent from PHP, it will not be visible in the browser console. Instead, we have to inspect the eventlogging end-point to see if the event was sent.
- []
=== BDD
- //For QA engineer to fill out.//
=== Test Steps
- //For QA engineer to fill out.//
//This task was created by Version 1.0.0 of the Reader Experience team task template using [[ https://phabulous.toolforge.org/ | phabulous ]].//