【发布时间】:2020-08-23 02:15:47
【问题描述】:
我想在我的 react 应用程序上实现 Google Analytics,我已经使用 react-ga 模块进行了设置。
import ReactGA from "react-ga";
...
ReactGA.initialize('analytics-code-here');
const App = () => {
useEffect(() => {
ReactGA.set({ page: window.location.pathname + window.location.search});
ReactGA.pageview(window.location.pathname + window.location.search)
}, [])
return (
...
);
我在两天前设置了它,但没有数据发送到我的分析帐户。
如何将数据接收到 Google Analytics 中?
【问题讨论】:
标签: reactjs google-analytics react-ga