== Background
In {T179426}, we used the current Page Previews EventLogging instrumentation to try to determine the typical time to first user link interaction (see T179426#3741809 and T179426#3741859). Unfortunately, the use of the server-side timestamp, which is only accurate to the second, was too high granularity in order to move forward with {T179426}.
@Gilles recommended that we specifically measure this metric with the high-precision (to the millisecond), monotonic clock exposed via [[https://developer.mozilla.org/en-US/docs/Web/API/Performance/timing | performance.now()]].
== Options
=== 1. With EventLogging
- Add an `event_timestamp` field to [[ https://meta.wikimedia.org/wiki/Schema:Popups | the Popups schema ]].
- In the client, set the field to `performance.now` for every event we send.
- Re-run the analysis in T179426#3741809 with the `event_timestamp` rather than the `timestamp` field.
=== 2. With statsv
- Update [the statsv reducer](https://github.com/wikimedia/mediawiki-extensions-Popups/blob/deccd841c30013b540fcd038c1c9f282fff0ab88/src/reducers/statsv.js) to send a timer metric representing the [[ https://github.com/wikimedia/mediawiki-extensions-Popups/blob/deccd841c30013b540fcd038c1c9f282fff0ab88/src/reducers/statsv.js#L32-L35 | the first link interaction ]], e.g.
```lang=js
const update = { linkDwellStartedAt: action.timestamp }
if ( isFirstInteraction ) {
update.action = 'timing.PagePreviewsFirstInteraction';
update.data = action.timestamp - pageLoadedTime; // Stored when reducing the BOOT action.
}
return nextState( state, update );
```
* Add [a histogram panel](http://docs.grafana.org/features/panels/heatmap/) to [the Page Previews dashboard](https://grafana.wikimedia.org/dashboard/db/reading-web-page-previews).
== AC
* We plot a histogram of the data that we've collected and re-present it to #performance-team.