useTracking
This commit is contained in:
parent
4c2f9011d0
commit
290a34bc64
|
@ -1,5 +1,5 @@
|
||||||
import { track } from '@amplitude/analytics-browser'
|
|
||||||
import { useEffect } from 'react'
|
import { useEffect } from 'react'
|
||||||
|
import { track } from 'web/lib/service/analytics'
|
||||||
import { inIframe } from './use-is-iframe'
|
import { inIframe } from './use-is-iframe'
|
||||||
|
|
||||||
export const useTracking = (
|
export const useTracking = (
|
||||||
|
@ -10,5 +10,5 @@ export const useTracking = (
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (excludeIframe && inIframe()) return
|
if (excludeIframe && inIframe()) return
|
||||||
track(eventName, eventProperties)
|
track(eventName, eventProperties)
|
||||||
}, [])
|
}, [eventName, eventProperties, excludeIframe])
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user