== Background
Deploying Page PWith the deployment of Page Previews, we introduce a new form of reading Wikipedia content apart from the standard pageviews. We need to measure this for the same reasons as we do for pageviews. These include providing executives with accurate numbers on the overall level of usage of our content, and the editor community with accurate numbers on the readership of the individual articles and projects they are working on. In particular, based on the previous A/B tests, we expect that the deployment of previews on a wiki will cause the total pageviews to decrease for that wiki.
However, we hypothesizebut that "page interactions" – any intentional interaction with a page, i.e. page previews + pageviews – will increase. We would like a way to track this metric over time as a means of testing this hypothesis.
=== Requirements/Constraints
# The page interaction data that we collect from Page Previews should //eventually// be available as Hive tables like [[ https://wikitech.wikimedia.org/wiki/Analytics/Data_Lake/Traffic/Pageview_hourly | `wmf.pageview_hourly` ]]
== Acceptance CriteriaClient-side, implement a way to register every preview that is seen by the reader (defined as having been visible for at least 1000ms), e.g. by sending an EventLoggin/beacon request as soon as that threshold time has passed
[] Determine a way to report on the following (daily # Server-side, weeklyimplement on a way to store, monthly, yearly):query and count these requests
# The page interaction data that we collect from Page Previews should //eventually// be available as aggregated Hive tables like [[ https://wikitech.wikimedia.org/wiki/Analytics/Data_Lake/Traffic/Pageview_hourly | `wmf.pageview_hourly` ]]
- Total page views
-== Acceptance Criteria
Determine a way to report on the following (hourly, daily, weekly, monthly, yearly):
[] Total page previews
- Total page interactions (pageviews + page previews)[] Page previews per project
[] Page previews per previewed page
[] Page previews by other applicable dimensions that are currently [[https://wikitech.wikimedia.org/wiki/Analytics/Data_Lake/Traffic/Pageview_hourly | used for pageviews]], e.g. country or browser type
== Notes ==
- Example comparison: total pageviews this month last year vs total page interactions this yearAs in the current [[https://meta.wikimedia.org/wiki/Schema:Popups| Popups schema]], we should also record information on the source page from which the preview was viewed (similar to the internal referer data we log for pageviews).
- To count as a page interaction, a page preview must be intentional, i.e. the preview must be open for more than X milliseconds.