Skip to content

Commit

Permalink
remove ga events
Browse files Browse the repository at this point in the history
  • Loading branch information
bouchja1 committed Dec 14, 2023
1 parent 5d356d9 commit 2b61aa4
Show file tree
Hide file tree
Showing 9 changed files with 2 additions and 49 deletions.
7 changes: 0 additions & 7 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@ import store, { persistor } from './redux/store';

const { Footer } = Layout;

/*
const initializeReactGA = () => {
ReactGA.initialize('UA-151784741-1');
ReactGA.send({ hitType: 'pageview', page: window.location.pathname });
};
*/

export const App = () => {
// init google analytics
if (process.env.NODE_ENV === 'production') {
Expand Down
11 changes: 1 addition & 10 deletions src/components/NewGameModeHelp.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';
import ReactGA from 'react-ga4';
import { Link } from 'react-router-dom';
import styled from 'styled-components';

Expand Down Expand Up @@ -34,15 +33,7 @@ export const NewGameModeHelp = () => {
return (
<NewGameModeHelpContainer>
<p>
<Link
to={`/${routeNames.nahratMisto}`}
onClick={() => {
ReactGA.event({
category: CATEGORIES.UPLOAD_NEW_PLACE_CLICKED,
action: 'New place upload click',
});
}}
>
<Link to={`/${routeNames.nahratMisto}`}>
Prosba o pomoc s přípravou nového herního módu "Zajímavá místa v ČR".
</Link>
</p>
Expand Down
5 changes: 0 additions & 5 deletions src/components/modes/CustomPlace.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Col, InputNumber, Row, Slider, Tooltip } from 'antd';
import React, { useContext, useEffect, useMemo, useRef, useState } from 'react';
import ReactGA from 'react-ga4';
import { useDispatch } from 'react-redux';
import { Redirect } from 'react-router-dom';

Expand Down Expand Up @@ -32,10 +31,6 @@ export const CustomPlace = ({ multiplayerSupported }) => {
};

const handleClickStartGame = (resultMode, noMove = false) => {
ReactGA.event({
category: CATEGORIES.SUGGESTED,
action: 'Play suggested city game',
});
dispatch(
setCurrentGame({
mode: gameModes.custom,
Expand Down
5 changes: 0 additions & 5 deletions src/components/modes/Geolocation.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Button, Col, InputNumber, Row, Slider, Tooltip } from 'antd';
import React, { useState } from 'react';
import ReactGA from 'react-ga4';
import useGeolocation from 'react-hook-geolocation';
import { useDispatch } from 'react-redux';
import { Redirect } from 'react-router-dom';
Expand All @@ -27,10 +26,6 @@ export const Geolocation = () => {
};

const handleClickStartGame = (resultMode, noMove = false) => {
ReactGA.event({
category: CATEGORIES.GEOLOCATION,
action: 'Play geolocation city game',
});
dispatch(
setCurrentGame({
mode: gameModes.geolocation,
Expand Down
5 changes: 0 additions & 5 deletions src/components/modes/Heraldry.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Button } from 'antd';
import React, { useState } from 'react';
import ReactGA from 'react-ga4';
import { useDispatch } from 'react-redux';
import { Redirect } from 'react-router-dom';

Expand All @@ -16,10 +15,6 @@ export const Heraldry = () => {

const handlePlayHeraldry = () => {
const randomCity = getRandomCzechPlaceWithCoatOfArms();
ReactGA.event({
category: CATEGORIES.HERALDRY,
action: 'Play heraldry',
});
dispatch(
// @ts-ignore
setCurrentGame({
Expand Down
5 changes: 0 additions & 5 deletions src/components/modes/Random.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, { useState } from 'react';
import ReactGA from 'react-ga4';
import { useDispatch } from 'react-redux';
import { Redirect } from 'react-router-dom';

Expand All @@ -26,10 +25,6 @@ export const Random = ({ multiplayerSupported }) => {
};

const handleClickStartGame = (resultMode, noMove = false) => {
ReactGA.event({
category: CATEGORIES.RANDOM_CITY,
action: 'Play random city game',
});
dispatch(
setCurrentGame({
mode: gameModes.random,
Expand Down
5 changes: 0 additions & 5 deletions src/components/modes/RandomPlaceInRegion.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, { useState } from 'react';
import ReactGA from 'react-ga4';
import { useDispatch } from 'react-redux';
import { Redirect } from 'react-router-dom';

Expand Down Expand Up @@ -86,10 +85,6 @@ export const RandomPlaceInRegion = ({ multiplayerSupported, regionNutCode }) =>
};

const handleClickStartGame = (resultMode, noMove = false) => {
ReactGA.event({
category: CATEGORIES.RANDOM_PLACE_IN_REGION,
action: 'Play random place in region',
});
dispatch(
setCurrentGame({
mode: gameModes.randomRegion,
Expand Down
5 changes: 0 additions & 5 deletions src/components/modes/RegionCity.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Col, InputNumber, Row, Select, Slider, Tooltip } from 'antd';
import React, { useState } from 'react';
import ReactGA from 'react-ga4';
import { useDispatch } from 'react-redux';
import { Redirect } from 'react-router-dom';

Expand Down Expand Up @@ -62,10 +61,6 @@ export const RegionCity = ({ multiplayerSupported }) => {
};

const handleClickStartGame = (resultMode, noMove = false) => {
ReactGA.event({
category: CATEGORIES.CITY,
action: 'Play city game',
});
const selectedCity = cities.filter(city => {
return city.name === citySelected.name;
});
Expand Down
3 changes: 1 addition & 2 deletions src/containers/ModesOverview.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Button, Card, Radio, RadioChangeEvent, Select } from 'antd';
import { Card, Radio, RadioChangeEvent, Select } from 'antd';
import React, { useMemo, useState } from 'react';
import ReactGA from 'react-ga4';
import { useHistory } from 'react-router-dom';
import styled from 'styled-components';

Expand Down

0 comments on commit 2b61aa4

Please sign in to comment.