manifold/web/hooks/use-tracking.ts

9 lines
232 B
TypeScript
Raw Permalink Normal View History

import { track } from '@amplitude/analytics-browser'
import { useEffect } from 'react'
export const useTracking = (eventName: string, eventProperties?: any) => {
useEffect(() => {
track(eventName, eventProperties)
}, [])
}