Skip to content

Commit

Permalink
chore: add page view events
Browse files Browse the repository at this point in the history
  • Loading branch information
JeevaRamu0104 committed Sep 26, 2024
1 parent f46ec6a commit 4304520
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 29 deletions.
14 changes: 0 additions & 14 deletions src/entryPoints/AuthModule/Common/CommonAuthUtils.res
Original file line number Diff line number Diff line change
Expand Up @@ -185,17 +185,3 @@ module ToggleLiveTestMode = {
</>
}
}

let setUserInMixpanel = email => {
if email->LogicUtils.isNonEmptyString {
try {
let mixpanelUserInfo =
[("email", email->JSON.Encode.string)]->LogicUtils.getJsonFromArrayOfJson
MixPanel.identify(email)
MixPanel.mixpanel.people.set(mixpanelUserInfo)
} catch {
| _ => ()
}
LocalStorage.setItem("deviceId", email)
}
}
1 change: 0 additions & 1 deletion src/entryPoints/AuthModule/TwoFaAuth/TwoFaAuth.res
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ let make = (~setAuthStatus, ~authType, ~setAuthType) => {
}
}
)
CommonAuthUtils.setUserInMixpanel(email)
} catch {
| _ => showToast(~message="Something went wrong, Try again", ~toastType=ToastError)
}
Expand Down
14 changes: 0 additions & 14 deletions src/entryPoints/HyperSwitchEntry.res
Original file line number Diff line number Diff line change
Expand Up @@ -78,20 +78,6 @@ module HyperSwitchEntryComponent = {
None
}, [])

React.useEffect(() => {
if featureFlagDetails.mixpanel {
MixPanel.init(
Window.env.mixpanelToken,
{
"track_pageview": true,
"batch_requests": true,
},
)
}

None
}, [featureFlagDetails.mixpanel])

let setPageName = pageTitle => {
let page = pageTitle->LogicUtils.snakeToTitle
let title = `${page} - Dashboard`
Expand Down

0 comments on commit 4304520

Please sign in to comment.