diff options
author | Noah Loomans <noahloomans@gmail.com> | 2017-09-13 21:29:15 +0200 |
---|---|---|
committer | Noah Loomans <noahloomans@gmail.com> | 2017-09-13 21:29:15 +0200 |
commit | e87bf34e06f8bec3c6622102528c2d685b3cbb5b (patch) | |
tree | eadfe43844faf52293f293ab37d9d621b6821329 /src/client/javascript/analytics.js | |
parent | 3fb86482404e11942cd83c3500a297a3991db0e4 (diff) |
Add some basic elm
Diffstat (limited to 'src/client/javascript/analytics.js')
-rw-r--r-- | src/client/javascript/analytics.js | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/src/client/javascript/analytics.js b/src/client/javascript/analytics.js deleted file mode 100644 index a93c8a4..0000000 --- a/src/client/javascript/analytics.js +++ /dev/null @@ -1,35 +0,0 @@ -/* global ga */ - -const self = {} - -self.send = {} - -self.send.search = function (selectedUser, favorite) { - const hitType = 'event' - - const eventCategory = favorite ? 'search fav' : 'search' - - let eventAction - switch (selectedUser.type) { - case 'c': - eventAction = 'Class' - break - case 't': - eventAction = 'Teacher' - break - case 'r': - eventAction = 'Room' - break - case 's': - eventAction = 'Student' - break - } - - const eventLabel = selectedUser.value - - ga(function () { - ga('send', { hitType, eventCategory, eventAction, eventLabel }) - }) -} - -module.exports = self |