Files
notifications-admin/app/assets/javascripts/errorTracking.js
Chris Hill-Scott 82233340b6 Track errors when uploading spreadsheets
Uses the new javascript event tracking stuff so that we can see what
errors people are getting when they upload spreadsheets.
2017-07-20 12:06:15 +01:00

23 lines
331 B
JavaScript

(function(Modules) {
"use strict";
Modules.TrackError = function() {
this.start = function(component) {
if (!ga) return;
ga(
'send',
'event',
'Error',
$(component).data('error-type'),
$(component).data('error-label')
);
};
};
})(window.GOVUK.Modules);