Google Analytics
This commit is contained in:
parent
5c3b2680ae
commit
9bd461dfac
|
@ -11,6 +11,7 @@
|
|||
"react": "^16.13.1",
|
||||
"react-color": "^2.18.1",
|
||||
"react-dom": "^16.13.1",
|
||||
"react-ga": "^3.0.0",
|
||||
"react-github-btn": "^1.2.0",
|
||||
"react-redux": "^7.2.0",
|
||||
"react-scripts": "3.4.1",
|
||||
|
|
|
@ -1,14 +1,23 @@
|
|||
import {actionTypes} from "../constant/ActionTypes";
|
||||
import ReactGA from "react-ga";
|
||||
|
||||
export const genQRInfo = text => ({
|
||||
type: actionTypes.GENERATE_QR_INFO,
|
||||
text
|
||||
})
|
||||
|
||||
export const changeStyle = (rendererIndex, rendererType, value) => ({
|
||||
export const changeStyle = (rendererIndex, rendererType, value) => {
|
||||
ReactGA.event({
|
||||
category: 'Style',
|
||||
action: 'Switch',
|
||||
value: value
|
||||
});
|
||||
|
||||
return {
|
||||
type: actionTypes.CHANGE_STYLE,
|
||||
rendererIndex, rendererType, value
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export const changeCorrectLevel = (correctLevel) => ({
|
||||
type: actionTypes.CHANGE_CORRECT_LEVEL,
|
||||
|
|
|
@ -10,7 +10,9 @@ import PartStylesViewer from "../../containers/app/PartStylesViewer";
|
|||
import {getDownloadCount, login} from "../../api/db";
|
||||
import {connect} from 'react-redux';
|
||||
import {loadDownloadData} from "../../actions";
|
||||
import ReactGA from 'react-ga';
|
||||
|
||||
ReactGA.initialize('UA-165845289-1');
|
||||
function App({ dispatch }) {
|
||||
const updateDownloadData = useCallback((downloadData) => dispatch(loadDownloadData(downloadData)), []);
|
||||
|
||||
|
|
|
@ -8703,6 +8703,11 @@ react-error-overlay@^6.0.7:
|
|||
resolved "https://registry.npm.taobao.org/react-error-overlay/download/react-error-overlay-6.0.7.tgz#1dcfb459ab671d53f660a991513cb2f0a0553108"
|
||||
integrity sha1-Hc+0WatnHVP2YKmRUTyy8KBVMQg=
|
||||
|
||||
react-ga@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.npm.taobao.org/react-ga/download/react-ga-3.0.0.tgz#4d665389cf0c489c36c5fdf97722a7e53efdfc5b"
|
||||
integrity sha1-TWZTic8MSJw2xf35dyKn5T79/Fs=
|
||||
|
||||
react-github-btn@^1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.npm.taobao.org/react-github-btn/download/react-github-btn-1.2.0.tgz#464066f999a77c0eed27980260601b51cbe15614"
|
||||
|
|
Loading…
Reference in New Issue