added message of failed login/register into google analytics

This commit is contained in:
Henry Oswald 2014-03-10 15:07:54 +00:00
parent 21ec74e51c
commit 70fcac19a6

View file

@ -31,7 +31,7 @@ require [
success: (data)-> success: (data)->
if data.message? if data.message?
new Message data.message new Message data.message
ga('send', 'event', 'register', 'failure') ga('send', 'event', 'register', 'failure', data.message)
else else
ga('send', 'event', 'register', 'success') ga('send', 'event', 'register', 'success')
window.location = data.redir || "/project" window.location = data.redir || "/project"
@ -81,7 +81,7 @@ require [
success: (data)-> success: (data)->
if data.message if data.message
new Message data.message new Message data.message
ga('send', 'event', 'login', 'failure') ga('send', 'event', 'login', 'failure', data.message)
else if data.redir else if data.redir
window.location.href = data.redir window.location.href = data.redir
ga('send', 'event', 'login', 'success') ga('send', 'event', 'login', 'success')