useTracking

This commit is contained in:
mantikoros 2022-10-02 13:39:29 -05:00
parent 4c2f9011d0
commit 290a34bc64

View File

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