Prior to changing to our new print styles, we would like to establish a baseline of the number of users printing on desktop. We would like to look at the following questions:
- How many users are printing per session?
- How many users are printing multiple times per session?
Based on prior data, there is probably going to be a substantial amount of daily variation in the data, and also, printing activity may be affected by seasonal changes. So this new data should not be used for any day to day comparisons. But it will give us a better idea of how our print feature is being used.
- Create a schema with the following:
Events (which are referred to as actions in the Popups schema).
- Clicks on the "printable version" link.
- Browser print events (where browser supports it), in form of onbeforeprint
Properties (for all events):
- sessionToken ( = mw.user.sessionId())
- pageTitle ( = mw.config.get( 'wgPageName' ))
- namespaceId ( = mw.config.get( 'wgNamespaceNumber'))
- skin ( = mw.config.get( 'skin'))
- The instrumentation will sample by user session and not by pageview.
- To start with, the sampling rate is 10% of all distinct browser sessions.
- We cannot tell if the user actually abandons the print, only that they clicked. For instance, various factors including how the print styles look may actually lead to a user abandoning a print, but we will have no idea about that.
- @bmansurov found that Opera would trigger the beforeprint event twice (see T171162#3457776). Ensure that it's only handled once.
- Define the instrumentation in the WikimediaEvents extension as Wikimedia-specific and skin-agnostic.
- Are we tracking prints for all skins or just Vector?
@phuedx: By listening to the the onbeforeprint, we should be able to instrument all skins. I've added the skin property to the event above.
- What is the sampling rate?
@phuedx: 0.1% of all distinct browser sessions seems to be a sensible default. This yields a peak rate of 5 events per second for the NavigationTiming instrumentation, for example.
- Can we provide a list of browsers which support detecting whether a user has entered print mode?
- Edge 12+
- Firefox for Android 54
- Firefox 6+
- Chrome 9+
- Safari 5.1+
- Opera 12.1+ (though @bmansurov's testing revises this to Opera 15+)
- Opera Mini
- Android Browser 3+
Which I think equates to very nearly all Grade A and Grade C browsers.
In the longer term we will want to consider the following questions but these should be considered out of scope for this task - please see T169731:
- Is the overall number of users who print multiple times per session decreasing or increasing after the deployment of the new print styles? (Will likely require an A/B test but that is out of the scope of this task)
- Can we bucket by session for an actual A/B test?