I get this error:
Command ignored. Unknown target: undefined
...when trying to trigger an event like this
ReactGA.event({
category: 'Navigation',
action: 'Clicked main CTA',
})
What does that mean?
I have initialised it like this:
ReactGA.initialize(process.env.REACT_APP_UA_ID, {
debug: true,
})
And pageviews work:
ReactGA.pageview(window.location.pathname + window.location.search)