Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
frontend
Commits
fd5c469e
Commit
fd5c469e
authored
Dec 17, 2024
by
tom
Committed by
tom goriunov
Dec 23, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[skip ci] reset mixpanel on logout
parent
10b4b96a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
0 deletions
+13
-0
index.ts
lib/mixpanel/index.ts
+2
-0
reset.ts
lib/mixpanel/reset.ts
+10
-0
useLogout.ts
ui/snippets/auth/useLogout.ts
+1
-0
No files found.
lib/mixpanel/index.ts
View file @
fd5c469e
import
getPageType
from
'
./getPageType
'
;
import
getPageType
from
'
./getPageType
'
;
import
getUuid
from
'
./getUuid
'
;
import
getUuid
from
'
./getUuid
'
;
import
logEvent
from
'
./logEvent
'
;
import
logEvent
from
'
./logEvent
'
;
import
reset
from
'
./reset
'
;
import
useInit
from
'
./useInit
'
;
import
useInit
from
'
./useInit
'
;
import
useLogPageView
from
'
./useLogPageView
'
;
import
useLogPageView
from
'
./useLogPageView
'
;
import
*
as
userProfile
from
'
./userProfile
'
;
import
*
as
userProfile
from
'
./userProfile
'
;
...
@@ -13,4 +14,5 @@ export {
...
@@ -13,4 +14,5 @@ export {
getPageType
,
getPageType
,
getUuid
,
getUuid
,
userProfile
,
userProfile
,
reset
,
};
};
lib/mixpanel/reset.ts
0 → 100644
View file @
fd5c469e
import
mixpanel
from
'
mixpanel-browser
'
;
import
config
from
'
configs/app
'
;
export
default
function
reset
()
{
if
(
!
config
.
features
.
mixpanel
.
isEnabled
)
{
return
;
}
mixpanel
.
reset
();
}
ui/snippets/auth/useLogout.ts
View file @
fd5c469e
...
@@ -53,6 +53,7 @@ export default function useLogout() {
...
@@ -53,6 +53,7 @@ export default function useLogout() {
});
});
mixpanel
.
logEvent
(
mixpanel
.
EventTypes
.
ACCOUNT_ACCESS
,
{
Action
:
'
Logged out
'
},
{
send_immediately
:
true
});
mixpanel
.
logEvent
(
mixpanel
.
EventTypes
.
ACCOUNT_ACCESS
,
{
Action
:
'
Logged out
'
},
{
send_immediately
:
true
});
mixpanel
.
reset
();
if
(
if
(
PROTECTED_ROUTES
.
includes
(
router
.
pathname
)
||
PROTECTED_ROUTES
.
includes
(
router
.
pathname
)
||
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment