mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #7348 from overleaf/ab-login-events
[web] Add events for login buttons clicks and segmentation to user-logged-in event GitOrigin-RevId: 6283feb075e2d16c871d3f4ff54fe903937d3263
This commit is contained in:
parent
9cd5922cef
commit
62d5eda194
1 changed files with 5 additions and 1 deletions
|
@ -606,7 +606,11 @@ function _loginAsyncHandlers(req, user, anonymousAnalyticsId, isNewUser) {
|
|||
LoginRateLimiter.recordSuccessfulLogin(user.email, () => {})
|
||||
AuthenticationController._recordSuccessfulLogin(user._id, () => {})
|
||||
AuthenticationController.ipMatchCheck(req, user)
|
||||
Analytics.recordEventForUser(user._id, 'user-logged-in')
|
||||
Analytics.recordEventForUser(user._id, 'user-logged-in', {
|
||||
source: req.session.saml
|
||||
? 'saml'
|
||||
: req.user_info?.auth_provider || 'email-password',
|
||||
})
|
||||
Analytics.identifyUser(user._id, anonymousAnalyticsId, isNewUser)
|
||||
|
||||
logger.log(
|
||||
|
|
Loading…
Reference in a new issue