diff --git a/src/analytics.js b/src/analytics.js index 5bfefcd..3d7b029 100644 --- a/src/analytics.js +++ b/src/analytics.js @@ -1,3 +1,5 @@ +/* global ga */ +// eslint-disable-next-line max-params window.trackEvent = function (category, action, label, value) { if (window.ga) { ga('send', 'event', category, action, label, value); @@ -7,6 +9,8 @@ window.trackEvent = function (category, action, label, value) { // if online, load after sometime if (navigator.onLine) { setTimeout(function() { + + /* eslint-disable */ (function(i,s,o,g,r,a,m){ i['GoogleAnalyticsObject']=r; i[r]=i[r]||function(){ @@ -18,5 +22,8 @@ if (navigator.onLine) { // required for chrome extension protocol ga('set', 'checkProtocolTask', function(){ /* nothing */ }); ga('send', 'pageview'); + + /* eslint-enable */ + }, 0); } \ No newline at end of file diff --git a/src/script.js b/src/script.js index 99b9e50..eee4d6a 100644 --- a/src/script.js +++ b/src/script.js @@ -1,3 +1,4 @@ +/* global trackEvent */ /* eslint-disable no-extra-semi */ ;(function () {