Skip to content
Snippets Groups Projects
Commit 812c4445 authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

matomo: also send unhandledrejection errors to matomo

parent 3ed00b50
No related branches found
No related tags found
No related merge requests found
Pipeline #15114 failed
......@@ -92,6 +92,10 @@ export class MatomoElement extends DBPLitElement {
_paq.push(['trackEvent', 'Error', e.error.message + '\n' + e.error.stack]);
});
window.addEventListener('unhandledrejection', function(e) {
_paq.push(['trackEvent', 'UnhandledRejection', e.reason]);
});
this.isRunning = true;
if (this.lastEvent.length > 0) {
console.log('MatomoElement* (' + this.isRunning + '): ' + this.lastEvent[1] + ', ' + this.lastEvent[2]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment