From 2c01c71b712a6cc4e929e67c34509229fff574ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Paczy=C5=84ski?= Date: Wed, 8 Nov 2023 17:39:01 +0100 Subject: [PATCH] Add `isMobile` property into `data` object --- src/shared/hooks/helpers.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/shared/hooks/helpers.ts b/src/shared/hooks/helpers.ts index 37563af34..70ad1f1e5 100644 --- a/src/shared/hooks/helpers.ts +++ b/src/shared/hooks/helpers.ts @@ -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 }, []) }