From 15521a76376dbf0a7fdff027729947369ba7398b Mon Sep 17 00:00:00 2001 From: Shomil Jain Date: Wed, 25 Nov 2020 21:04:25 -0800 Subject: [PATCH] added ga --- client/package-lock.json | 5 +++++ client/package.json | 1 + client/src/App.js | 12 ------------ client/src/index.js | 4 ++++ 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/client/package-lock.json b/client/package-lock.json index 50bb4e6..d816072 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -11795,6 +11795,11 @@ "resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.8.tgz", "integrity": "sha512-HvPuUQnLp5H7TouGq3kzBeioJmXms1wHy9EGjz2OURWBp4qZO6AfGEcnxts1D/CbwPLRAgTMPCEgYhA3sEM4vw==" }, + "react-ga": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/react-ga/-/react-ga-3.3.0.tgz", + "integrity": "sha512-o8RScHj6Lb8cwy3GMrVH6NJvL+y0zpJvKtc0+wmH7Bt23rszJmnqEQxRbyrqUzk9DTJIHoP42bfO5rswC9SWBQ==" + }, "react-input-autosize": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/react-input-autosize/-/react-input-autosize-2.2.2.tgz", diff --git a/client/package.json b/client/package.json index 58bacc6..c33b78d 100644 --- a/client/package.json +++ b/client/package.json @@ -11,6 +11,7 @@ "react": "^17.0.1", "react-bootstrap": "^1.4.0", "react-dom": "^17.0.1", + "react-ga": "^3.3.0", "react-redux": "^7.2.2", "react-router-dom": "^5.2.0", "react-scripts": "4.0.0", diff --git a/client/src/App.js b/client/src/App.js index e20f208..2addda8 100644 --- a/client/src/App.js +++ b/client/src/App.js @@ -1,6 +1,4 @@ import './App.css'; -import { Row, Col, Card, Badge, Form } from 'react-bootstrap'; -import Select from 'react-select' import Home from './components/home/home' import { @@ -9,16 +7,6 @@ import { Route, } from "react-router-dom"; -const courses = [ - { value: '161', label: 'CS 161' }, - { value: '170', label: 'CS 170' }, - { value: '188', label: 'CS 188' } -] - -const professors = [ - { value: 'sahai', label: 'Anant Sahai' }, - { value: 'weaver', label: 'Nicholas Weaver'} -] function App() { return ( diff --git a/client/src/index.js b/client/src/index.js index f59e7d5..172524a 100644 --- a/client/src/index.js +++ b/client/src/index.js @@ -9,6 +9,10 @@ import { render } from 'react-dom' import { Provider } from 'react-redux' import store from './redux/store' +import ReactGA from 'react-ga'; + +/* Initialize Google Analytics. */ +ReactGA.initialize('G-ZMDNDHM5EN'); const renderApp = () => { render (