diff --git a/package.json b/package.json index 5d32db0..55f929b 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "classnames": "^2.2.6", "react": "^16.8.6", "react-dom": "^16.8.6", + "react-ga": "^2.6.0", "react-router-dom": "^5.0.0" }, "devDependencies": { diff --git a/src/apps/ConferenceApp/ConferenceApp.tsx b/src/apps/ConferenceApp/ConferenceApp.tsx index 316b1a3..43c4f2a 100644 --- a/src/apps/ConferenceApp/ConferenceApp.tsx +++ b/src/apps/ConferenceApp/ConferenceApp.tsx @@ -23,6 +23,8 @@ import { IProps, IState } from "./types"; import styles from "./ConferenceApp.module.scss"; import { IEdition } from "../../types/IConference"; import constants from "../../constants"; +import ReactGA from 'react-ga'; +import withTracker from '../withTracker'; const sortByName = (itemA: any, itemB: any) => { if (itemA.name < itemB.name) return -1; @@ -38,6 +40,8 @@ const Home: React.SFC = ({ conferenceInfo, globalInfo }: { conferenceInfo: const globalOrganizers = globalInfo.organizers ? globalInfo.organizers.sort(sortByName) : []; + ReactGA.pageview(location.pathname); + return ( <> @@ -114,9 +118,9 @@ export default class ConferenceApp extends React.PureComponent { {/* Body */} } /> - - - + + + {/* End body */}