diff --git a/src/analytics.js b/src/analytics.js
new file mode 100644
index 0000000..12215b6
--- /dev/null
+++ b/src/analytics.js
@@ -0,0 +1,22 @@
+window.trackEvent = function (category, action, label, value) {
+ if (window.ga) {
+ ga('send', 'event', category, action, label, value);
+ }
+}
+
+// if online, load after 2 seconds
+if (navigator.onLine) {
+ setTimeout(function() {
+ (function(i,s,o,g,r,a,m){
+ i['GoogleAnalyticsObject']=r;
+ i[r]=i[r]||function(){
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+ })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
+
+ ga('create', 'UA-87786708-1', {'cookieDomain': 'none'});
+ // required for chrome extension protocol
+ ga('set', 'checkProtocolTask', function(){ /* nothing */ });
+ ga('send', 'pageview');
+ }, 0);
+}
\ No newline at end of file
diff --git a/src/index.html b/src/index.html
index 3807fdb..1a3f10c 100644
--- a/src/index.html
+++ b/src/index.html
@@ -555,10 +555,10 @@
+
-