Background
The early onboarding experiment T437339: Recommended reading exp: Instrument user interaction on module reads its page visits from the client-side page_visit events sent by anyPageVisit in WikimediaEvents. Those events request only page_namespace_id, so Special:Homepage cannot be told apart from any other special page. The server-side page_visit from SpecialHomepage.php would carry page_title, but the experiment does not use it.
The instrumentation spec asks for action_context: { page: homepage } on page visits. The new withContext helper T438898: Add wrapper helpers to add more context to analytics events already provides the mechanism.
Goal
Make Special:Homepage identifiable in the experiment's page_visit events, so the "Pageviews of homepage" metric can be calculated easily.
Acceptance criteria for done
- page_visit events sent on Special:Homepage carry page: homepage in action_context; events on other pages do not.
- Don't send action_context when there is nothing to record, instead of "{}".
- Events validate against analytics/product_metrics/web/base/2.0.0 (action_context is a string; see T437122: Launch experiment for donor consent).