This PR adds a new custom dimension to make it easier to report on performance timing of this data in Google Analytics. A limitation of GA currently is you can typically only report on a metric's total or average. You can't calculate its median or plot its distribution.
By adding a new custom dimension (called "Metric Value") to all perf hits, we'll be able to report on these values both as metrics (to get aggregates and take advantage of metric filters and segments) as well as by dimension, so we can break down the individual hits subdivided by value.
I've been testing this technique for a few days on another site measuring web font load times, and I'm able to report on the data like this via the API:
As you can see, I'm able to calculate a median doing it this way: 930ms. FWIW, the average value for this same dataset is 1640ms, so doing it this way gives us way more insight.
In addition to adding this dimension, the PR fixes a bug where the analytics timeout event value wasn't being rounded. It also converts all bound functions to fat arrow functions.
This PR adds a new custom dimension to make it easier to report on performance timing of this data in Google Analytics. A limitation of GA currently is you can typically only report on a metric's total or average. You can't calculate its median or plot its distribution.
By adding a new custom dimension (called "Metric Value") to all perf hits, we'll be able to report on these values both as metrics (to get aggregates and take advantage of metric filters and segments) as well as by dimension, so we can break down the individual hits subdivided by value.
I've been testing this technique for a few days on another site measuring web font load times, and I'm able to report on the data like this via the API:
As you can see, I'm able to calculate a median doing it this way: 930ms. FWIW, the average value for this same dataset is 1640ms, so doing it this way gives us way more insight.
In addition to adding this dimension, the PR fixes a bug where the analytics timeout event value wasn't being rounded. It also converts all bound functions to fat arrow functions.