We want to find out to what extend Reference Previews is improving readers' behavior. This ticket is for getting more info about Reference Previews usage, T231529 is about creating a baseline that we can compare the usage against.
[x] How often do people look at a reference pop up relative to the pages being opened? E.g. On average, there were 0.03 showings of a reference pop up per page opened where Reference Previews was deployed.
[x] In how many percent of the cases do users click on “go to references section” when they see a reference preview?
~~ In ~~In how many percent of the cases do users click on a link inside the reference itself when they see a reference preview?~~
 How often (absolute number per page being opened) do people (who have referencepreview enabled) click on a link inside the reference itself when they see a reference preview?
[x] How often (absolute number per page being opened) do people (who have referencepreview enabled) click on a link inside the reference itself, but from the references section
[x] In how many percent of the cases does an opened reference pop up contain scroll bars?
[x] Of those times, how often do users scroll? (For now, let’s not separate between horizontally and vertically)
== Metrics mappings
We're reusing the a new schema "[[ https://meta.wikimedia.org/w/index.php?title=Schema:ReferencePreviewsPopups | ReferencePreviewsPopups ]] schema", including new fields. Data we'll extract uswhich tracks the following this schema:actions:
* `action: pageLoaded` tells us how many times a page was openedclickedReferenceContentLink` is sent for clicks on links in the references area content. This includes edit pageloads, unfortunately**TODO** unreliable.
* `action: dismissed` with `previewType: reference` is recorded each time a reference preview has been opened for the minimum time, and clospoppedOpen` is sent when a reference preview is rendered. `scrollbarsPresent: true` is set when the reference overflows its bounding box and a vertical scrollbar is present.
* `action: clickedGoToReferences` is sent when "jump to references" is clicked.
* `action: opened` with `previewType:scrolled` is sent exactly once, if the user scrolls a reference` is sent when a footnote link is clicked preview either horizontally or vertically.
The [[ https://meta.wikimedia.org/w/index.php?title=Schema:ReferencePreviewsBaseline | ReferencePreviewsBaseline ]] schema supplements our datais can be supplemented with ReferencePreviewsBaseline to collect all of the metrics we need here, although note that the sampling rate may be different. That will already collect the following:
* `action: pageview` is recorded when opening a page with Cite enabled. When Reference Previews are enabled for the user, whenthis event will include `referencePreviewsEnabled: true`:.
* `action: clickedFootnote` is probably a more reliable metric than the `Popups` metric for reference clickwhen clicking a reference link (""). **Note** that this also fires in other circumstances such as when "Jump to references" is clicked, so we need to refine a bit or at least figure out how to calculate the correct statistics.
* `action: clickedReferenceContentLink` is sent forwhen clicks oning on a links in the rReferences area contentsection.
>>! @Jdlrobson [wrote](https://meta.wikimedia.org/wiki/Schema_talk:Popups#Should_ReferenceTooltips_be_logged_in_a_separate_schema):
> I see [the schema](https://meta.wikimedia.org/wiki/Schema:Popups) has been updated to include ReferenceTooltips. I wonder if it might make sense to use a new schema, given you'll likely want to log reference tooltip previews separately from page previews. I'd imagine reference tooltips will display less often then link previews so if you are leaning heavily on the existing logging code, the sample size for reference tooltips is likely to be very small in comparison to link previews. Does it make sense to "fork" this schema and update the code so that it doesn't log link previews at all, or is data relating to link previews important for the questions you are trying to answer?