== 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 (milliseconds accurate to 5 microseconds), monotonic clock exposed via [[https://developer.mozilla.org/en-US/docs/Web/API/Performance/now | performance.now()]].
== Plan
Per T180036#374696, we'll add a high-precision timestamp to the existing EventLogging instrumentation. So, we'll:
- 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.
== Developer Notes
# The field could/should be added in [the `src/reducers/eventLogging.js#getBaseData` function](https://github.com/wikimedia/mediawiki-extensions-Popups/blob/deccd841c30013b540fcd038c1c9f282fff0ab88/src/reducers/eventLogging.js#L15-L33).
# All events have timestamps added to them. The timestamps are generated by calling `mw.now`, which proxies to `performance.now` when it's available. Use the timestamp from the event, rather than invoking `performance.now` in the reducer.
- This is mostly a point of principle: the reducers should only be combining data with existing state.
- Per T180036#3749812, if `performance.now` is unavailable for some reason, send `undefined`.
== AC
* We plot a histogram of the data that we've collected and re-present it to #performance-team.