Track event on Login Submit Success

Event Category: SignIn/Signup
Event Action: Login Submit Success
Event Name: the current url
This commit is contained in:
Jean-Baptiste Bellet
2021-10-12 11:41:12 +02:00
parent 969a7ef2d0
commit 9fcd6cd215

View File

@@ -11,6 +11,8 @@ angular.module('Darkswarm').controller "LoginCtrl", ($scope, $timeout, $location
$scope.submit = ->
Loading.message = t 'logging_in'
$http.post("/user/spree_user/sign_in", {spree_user: $scope.spree_user}).then (response)->
if window._paq
window._paq.push(['trackEvent', 'Signin/Signup', 'Login Submit Success', $location.absUrl()]);
if Redirections.after_login
$window.location.href = $window.location.origin + Redirections.after_login
else