2020-01-10 11:02:17 +00:00
|
|
|
(function(window) {
|
2018-08-08 08:49:16 +01:00
|
|
|
"use strict";
|
|
|
|
|
|
2025-10-06 09:38:54 -04:00
|
|
|
window.NotifyModules['track-error'] = function() {
|
2018-08-08 08:49:16 +01:00
|
|
|
|
2025-10-06 09:38:54 -04:00
|
|
|
this.start = function(element) {
|
|
|
|
|
var component = $(element);
|
2018-08-08 08:49:16 +01:00
|
|
|
|
2025-10-06 09:38:54 -04:00
|
|
|
// Track error to analytics if available
|
|
|
|
|
if (window.NotifyModules && window.NotifyModules.analytics && window.NotifyModules.analytics.trackEvent) {
|
|
|
|
|
window.NotifyModules.analytics.trackEvent(
|
|
|
|
|
'Error',
|
|
|
|
|
component.data('error-type'),
|
|
|
|
|
{
|
|
|
|
|
'label': component.data('error-label')
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
}
|
2018-08-08 08:49:16 +01:00
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
2020-01-10 11:02:17 +00:00
|
|
|
})(window);
|