I just noticed that the PerformanceTiming API used by Matomo is deprecated and might be one day removed from browsers or only supported for backwards compatibility ("Be aware that this feature may cease to work at any time.")
See https://developer.mozilla.org/en-US/docs/Web/API/Performance/timing
The suggested replacement is the PerformanceNavigationTiming API which should be used instead
I think window.performance.getEntriesByType("navigation")[0].toJSON()
gives a quick overview over the data.
Unfortunatly not all modern browsers support it yet, so I guess the replacement has to wait or both have to be supported at the same time.
We could check if the new API is supported to use the new API and otherwise fallback.