Skip to content

Commit

Permalink
Add analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
zorfling committed Jun 25, 2018
1 parent d11d12c commit f4e04cd
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"math-expression-evaluator": "^1.2.17",
"react": "^16.4.1",
"react-dom": "^16.4.1",
"react-ga": "^2.5.3",
"react-scripts": "1.1.4",
"styled-components": "^3.3.2"
},
Expand Down
4 changes: 4 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import React from 'react';
import ReactDOM from 'react-dom';
import ReactGA from 'react-ga';
import './index.css';
import App from './App';
import registerServiceWorker from './registerServiceWorker';

ReactGA.initialize('UA-1359868-17');
ReactGA.pageview(window.location.pathname + window.location.search);

ReactDOM.render(<App />, document.getElementById('root'));
registerServiceWorker();
9 changes: 8 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5578,6 +5578,13 @@ react-error-overlay@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-4.0.0.tgz#d198408a85b4070937a98667f500c832f86bd5d4"

react-ga@^2.5.3:
version "2.5.3"
resolved "https://registry.yarnpkg.com/react-ga/-/react-ga-2.5.3.tgz#0f447c73664c069a5fc341f6f431262e3d4c23c4"
optionalDependencies:
prop-types "^15.6.0"
react "^15.6.2 || ^16.0"

react-is@^16.3.1:
version "16.4.1"
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.4.1.tgz#d624c4650d2c65dbd52c72622bbf389435d9776e"
Expand Down Expand Up @@ -5627,7 +5634,7 @@ react-scripts@1.1.4:
optionalDependencies:
fsevents "^1.1.3"

react@^16.4.1:
"react@^15.6.2 || ^16.0", react@^16.4.1:
version "16.4.1"
resolved "https://registry.yarnpkg.com/react/-/react-16.4.1.tgz#de51ba5764b5dbcd1f9079037b862bd26b82fe32"
dependencies:
Expand Down

0 comments on commit f4e04cd

Please sign in to comment.