manifold/web/hooks/use-tracking.ts

9 lines
232 B
TypeScript
Raw Normal View History

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