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]) }