On the moderator tools team we want to analyse how many readers might have seen vandalism content before it is reverted. To do this we want to count pageviews while certain revisions are visible on a page.
This will help us understand the impact that #automoderator will have - our hypothesis is that if a community uses Automoderator, fewer readers will see bad content on their project, because it will be reverted more quickly. Although we are already planning to measure the time between content being added and being reverted, being able to track pageviews would give us a much clearer sense on the impact this has on readers.
@mpopov suggested that we could record the revision ID in the [[ https://wikitech.wikimedia.org/wiki/X-Analytics | X-Analytics ]] header, and then use a list of reverted revisions to find how many pageviews loaded that now-reverted content.
== Notes
1. The code that sets the X-Analytics header in production lives in the WikimediaEvents extension: https://gerrit.wikimedia.org/g/mediawiki/extensions/WikimediaEvents/+/05d1de36160d047e4a19a14cd250f1082d3f3c02/includes/WikimediaEventsHooks.php#74
1. The above has access to a `Title` object, which represents the title of the current page
1. `Title::getLatestRevisionID()` returns the ID of the latest revision associated with the current page