Skip to content
Snippets Groups Projects
Commit 1af3d022 authored by Bekerle, Patrizio's avatar Bekerle, Patrizio :fire: Committed by Reiter, Christoph
Browse files

Add Matomo error tracking

parent fc8bcf4f
No related branches found
No related tags found
No related merge requests found
...@@ -39,6 +39,10 @@ export const handleXhrError = (jqXHR, textStatus, errorThrown, icon = "sad") => ...@@ -39,6 +39,10 @@ export const handleXhrError = (jqXHR, textStatus, errorThrown, icon = "sad") =>
"icon": icon, "icon": icon,
"type": "danger", "type": "danger",
}); });
if (_paq !== undefined) {
_paq.push(['trackEvent', 'XhrError', body]);
}
}; };
/** /**
...@@ -84,4 +88,8 @@ export const handleFetchError = async (error, summary = "", icon = "sad") => { ...@@ -84,4 +88,8 @@ export const handleFetchError = async (error, summary = "", icon = "sad") => {
"icon": icon, "icon": icon,
"type": "danger", "type": "danger",
}); });
if (_paq !== undefined) {
_paq.push(['trackEvent', 'FetchError', summary === "" ? body : summary + ": " + body]);
}
}; };
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