react-ga组件的简单应用笔记

npm install react-ga --save  //导入react-ga组件 找到要检测的页面组件,在组件中添加语句如下: ReactGA.initialize的参数 是google 网页生成的(analytics.google.com) componentDidMount 内保证刷新页面或者第一次加载时 走ga componentWillReceiveProps 内保证切换route时
相关文章
相关标签/搜索