Sampath
(Sampath Boddula)
March 15, 2021, 11:04am
1
Hi @thomas_matomo ,
After upgrade 4.X ‘setGenerationTimeMs’ is not working and below is the error message showing “setGenerationTimeMs is no longer supported since Matomo 4. The call will be ignored. There is currently no replacement yet”,
Do we any alternate for this, please guide us how to solve this.
Thanks
Sampath
Lukas
(Lukas Winkler)
March 15, 2021, 12:34pm
2
Hi,
Matomo 4 replaces the old page load time, with the detailed performance metrics that record a lot more numbers.
This means that setGenerationTimeMs
doesn’t exist anymore:
opened 08:00PM - 01 Dec 20 UTC
closed 03:55AM - 02 Dec 20 UTC
Task
Regression
c: Documentation
According to the changelog there is no mentions of this breaking change that was… required following documentation of 3.x .
I can see there was some "optimization" undocumented (mainly deleted doc).
Could I have more informations about why it was deleted and how to safely do elsething ?
What exactly are you trying to achieve that isn’t working out of the box with the recorded statistics from the performanceAPI?
There is not yet a way to set these values manually, but if you are interested, a PR for this would be helpful:
opened 02:47AM - 02 Dec 20 UTC
closed 11:17PM - 15 Sep 21 UTC
Enhancement
Help wanted
Similar to how we used to have `setGenerationTimeMs`.
We then need to documen… t this in https://developer.matomo.org/guides/spa-tracking similar to how the other method used to be documented. Also of course need to document the JS Tracker reference etc.
We'll also need to adjust in JS tracker the logged console message in the `setGenerationTimeMs` method and mention to use this new method instead or maybe we can even somehow map setGenerationTimeMs to the new method but likely this wouldn't make any sense. Same in developer changelog need to adjust the text where we mention the `setGenerationTimeMs` removal.
@sgiehl feel free to close if we already have an issue for it. Couldn't find it.
It's to be seen how this makes sense because some performance metrics might not really make sense in SPA etc. Eg whether we have only one method and by default all metrics will be reset except the ones specified or whether we have individual metrics (but then the problem be that other performance values aren't reset and reports would become wrong).
We need a new JS tracker API method to set these [Performance Tracking HTTP API parameters](https://developer.matomo.org/api-reference/tracking-api#optional-page-performancehttpsmatomoorgfaqhow-tohow-do-i-see-page-performance-reports-info ). A name could be for example `setPagePerformanceTiming(networkTimeInMs, serverTimeInMs, ...)` and then the related tracking API parameters should be appended in the next tracking request. Basically users should be able to call eg `_paq.push(['setPagePerformanceTiming', 35, 103, ...])`. As far as I know all the parameters should be optional and if no value is set, then we won't send the related tracking parameter.
When someone sets the custom page performing timings, then we don't detect the timing ourselves.
The new method needs to be documented in https://developer.matomo.org/api-reference/tracking-javascript
Any set value will be sent along the next tracking request and then the configured values are reset so that the same values aren't sent in any following tracking request after that.
siva538
(Siva Kumar Rallabhandi)
March 16, 2021, 8:13am
3
@Lukas / @thomas_matomo - we are currently using this method for setting up the time taken for a SPA page load (route change success).
If this is deprecated, how do you want us to proceed further on this?
Thanks a lot.
Lukas
(Lukas Winkler)
March 16, 2021, 10:13am
4
I guess in that case it is best to contribute to https://github.com/matomo-org/matomo/issues/16859 . It should not be too hard to add a function that overrides the automatically detected values.