From 290a34bc640bfbc29c0a539ff56db43c24754e4f Mon Sep 17 00:00:00 2001 From: mantikoros Date: Sun, 2 Oct 2022 13:39:29 -0500 Subject: [PATCH] useTracking --- web/hooks/use-tracking.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/hooks/use-tracking.ts b/web/hooks/use-tracking.ts index e62209c0..3d1d97ba 100644 --- a/web/hooks/use-tracking.ts +++ b/web/hooks/use-tracking.ts @@ -1,5 +1,5 @@ -import { track } from '@amplitude/analytics-browser' import { useEffect } from 'react' +import { track } from 'web/lib/service/analytics' import { inIframe } from './use-is-iframe' export const useTracking = ( @@ -10,5 +10,5 @@ export const useTracking = ( useEffect(() => { if (excludeIframe && inIframe()) return track(eventName, eventProperties) - }, []) + }, [eventName, eventProperties, excludeIframe]) }