mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-06 11:23:48 -05:00
23 lines
513 B
JavaScript
23 lines
513 B
JavaScript
(function(window) {
|
|
"use strict";
|
|
|
|
window.NotifyModules['track-error'] = function() {
|
|
|
|
this.start = function(element) {
|
|
// Track error to analytics if available
|
|
if (window.NotifyModules && window.NotifyModules.analytics && window.NotifyModules.analytics.trackEvent) {
|
|
window.NotifyModules.analytics.trackEvent(
|
|
'Error',
|
|
element.dataset.errorType,
|
|
{
|
|
'label': element.dataset.errorLabel
|
|
}
|
|
);
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
})(window);
|