== Background
Based on several bug reports, we would like to know more about which click impressions result in a beforeprint event. The hope is this might shed more light on the issue about which browser versions of Chrome are having issues with printing the PDF button (i.e. on which browsers does a user select the button but nothing happens, see {T181261}).
Currently we log an event action clickPrintableVersion when the "Printable version" link is clicked in desktop. We want to add the mobile equivalent.
In addition to this, @Nirzar [[ https://phabricator.wikimedia.org/T181297#3808340 | requested ]] a better proxy for page impressions. @tbayer however [[ https://phabricator.wikimedia.org/T181297#3811119 | suggested ]] that we might not need this. I (@jdlrobson) am a little unsure what the decision was there.
== Acceptance criteria
Add the following events to the print instrumentation schema for Minerva only:
[] When the "download" button is clicked in the Minerva skin a "clickPrintableVersion" event will be sent. No change to schema is needed for this event.
[] When the "download" button is **visible** in the Minerva skin a "shownPrintButton" event will be sent to signal a page impression. A schema change for this new event is needed.
[] Create a task for turning eventlogging off after n weeks of collected data
== Notes
Note, per [[ https://phabricator.wikimedia.org/T181297#3794313 | analysis ]]by @pmiazga we cannot reliably detect:
- Print dialog opened
- how long does it take for dialog to appear after button is pressed
== Developer notes
It's probably easiest to implement this by augmenting the existing (and already partially vetted) [[https://meta.wikimedia.org/wiki/Schema:Print | Print schema]], e.g. by extending the definition of the `clickPrintableVersion` action to Minerva, standing for clicks on the PDF button there.
Triggering the shownPrintButton event will be tricky as the schema is managed by WikimediaEvents but added by the Minerva skin. I propose the Minerva skin triggers an event e.g. mw.track and WikimediaEvents makes use of trackSubscribe to forward the event in EventLogging.