Heya, I am trying to figure out if it’s possible to track JS / resource error that are normally printed to browser consoles?
However to make this work Matomo script needs to be loaded prior to anything else, which is not recommended. Also AFAIK it only tracks JS errors, but no errors regarding missing resources as fonts, images etc.
Anyone knows if this is possible to achieve?
If I remember correctly from my readings, you can push to the _paq array at anytime after the script is loaded. So, why not load just the script and the one push. And, then push everything else after the page has loaded?
Another thought on this subject. The Matomo tracking script is coded to load asycrhonically. Placing the Matomo script in the <head> tag may slow the overall loading of the page, but it will not interfere with the normal order in which the HTML is loaded.