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 de8ec2a commit f46ec6a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/screens/MixpanelHook.res
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ let usePageView = () => {
try {
if featureFlagDetails.mixpanel {
let _ = await fetchApi(
`https://app.hyperswitch.io/mixpanel/track`,
`${getHostUrl}/mixpanel/track`,
~method_=Post,
~bodyStr=`data=${body->JSON.stringifyAny->Option.getOr("")->encodeURI}`,
)
Expand All @@ -146,6 +146,7 @@ let useSetIdentity = () => {
let fetchApi = AuthHooks.useApiFetcher()
let mixpanel_token = Window.env.mixpanelToken
let featureFlagDetails = HyperswitchAtom.featureFlagAtom->Recoil.useRecoilValueFromAtom

async (~distinctId) => {
let name = distinctId->LogicUtils.getNameFromEmail
let body = {
Expand Down

0 comments on commit f46ec6a

Please sign in to comment.