Skip to content

Commit

Permalink
Add isMobile property into data object
Browse files Browse the repository at this point in the history
  • Loading branch information
xpaczka committed Nov 8, 2023
1 parent 9cb707e commit 2c01c71
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/shared/hooks/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,10 @@ export function useTrackEvents() {
const isMobile = useMobileScreen()

useEffect(() => {
posthog?.capture("$pageview", { url: location.pathname, isMobile })
posthog?.capture("$pageview", {
url: location.pathname,
data: { isMobile },
})
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [])
}

0 comments on commit 2c01c71

Please sign in to comment.