Move Matomo event tracking for login modal into Autherntication service

This commit is contained in:
Matt-Yorkley
2022-01-15 16:21:33 +00:00
parent dfdeb7368e
commit 26ac59fbba
2 changed files with 3 additions and 4 deletions

View File

@@ -21,6 +21,9 @@ angular.module('Darkswarm').factory "AuthenticationService", (Navigation, $modal
@selectedPath = path || @selectedPath
Navigation.navigate @selectedPath
if window._paq
window._paq.push(['trackEvent', 'Signin/Signup', 'Login Modal View', window.location.href])
# Opens the /login tab if returning from email confirmation,
# the /signup tab if opened from the enterprise registration page,
# otherwise opens whichever tab is selected in the URL params ('/login', '/signup', or '/forgot')

View File

@@ -42,7 +42,3 @@
tabindex: "4",
type: "submit",
value: "{{'label_login' | t}}"}
:javascript
if (window._paq) {
window._paq.push(['trackEvent', 'Signin/Signup', 'Login Modal View', window.location.href]);
}