For T403660: WE3.3.7 Year in Review and Activity Tab Services - Global Editor Metrics, we are counting pageviews by page_id.
page_id makes its way into the pageview_hourly via the X-Analytics header.
According to pageview_hourly docs, page_id is not currently set for 'mobile app pageviews':
As of 2017-06-12, page_id is populated on access methods desktop and mobile web requests, but not mobile app. This means that >95% of pageview requests have a page_id so far.
If page_id is not set in X-Analytics for mobile app page views, then we will not count views from mobile apps for T403660 - Global Editor Metrics. This is a bit weird, seeing as the Global Editor Metrics API endpoints are being developed to support features in mobile apps themselves.
(Probably the right thing to do is T371321: [Idea] Collect pageview data using client-side instrumentation, but that is a bit out of scope for this task.)
As of 2017-06-12, `page_id is populated [...] not mobile app
In T92875: Add page_id and namespace to X-Analytics header in App / api requests in 2018 in {T92875#4071587} @Krinkle. indicates that page_id should be set. This looks like it was done via ApiMobileView, which I'm not sure is still being used in 2025. What about Page Content Service? Or perhaps something else post RESTbase migration?
Is it possible the 2017 pageview_hourly docs are incorrect and we do set page_id for mobile apps?
See also
- T190381: Figure out XAnalytics stuff
- T217859: MobileFrontend should use XAnalytics extension
- T408798: Spike: investigate incorrect page_id values in pageview_hourly
- T159046: Track page views by page ID rather than title (handles moved pages)
- Slack thread
Done is
- Mobile app pageviews are counted in pageview_hourly Data Lake table with page_id and namespace_id fields set.