mirror of
https://github.com/uetchy/namae.git
synced 2025-08-20 18:08:11 +09:00
feat: add event reporter
This commit is contained in:
13
web/src/components/Analytics.js
Normal file
13
web/src/components/Analytics.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import { useEffect } from 'react'
|
||||
import ReactGA from 'react-ga'
|
||||
|
||||
export function EventReporter({ query }) {
|
||||
useEffect(() => {
|
||||
ReactGA.event({
|
||||
category: 'Navigation',
|
||||
action: 'Send a request',
|
||||
})
|
||||
}, [query])
|
||||
|
||||
return null
|
||||
}
|
Reference in New Issue
Block a user