diff --git a/package-lock.json b/package-lock.json index 4ad1b1c..0ec05dc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -40,7 +40,7 @@ "react-bootstrap": "^2.10.2", "react-dom": "^18.3.1", "react-error-boundary": "^4.0.13", - "react-ga": "^3.3.1", + "react-ga4": "^2.1.0", "react-icons": "^5.2.1", "react-konva": "^18.2.10", "react-redux": "^9.1.2", @@ -12009,14 +12009,10 @@ "react": ">=16.13.1" } }, - "node_modules/react-ga": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/react-ga/-/react-ga-3.3.1.tgz", - "integrity": "sha512-4Vc0W5EvXAXUN/wWyxvsAKDLLgtJ3oLmhYYssx+YzphJpejtOst6cbIHCIyF50Fdxuf5DDKqRYny24yJ2y7GFQ==", - "peerDependencies": { - "prop-types": "^15.6.0", - "react": "^15.6.2 || ^16.0 || ^17 || ^18" - } + "node_modules/react-ga4": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/react-ga4/-/react-ga4-2.1.0.tgz", + "integrity": "sha512-ZKS7PGNFqqMd3PJ6+C2Jtz/o1iU9ggiy8Y8nUeksgVuvNISbmrQtJiZNvC/TjDsqD0QlU5Wkgs7i+w9+OjHhhQ==" }, "node_modules/react-icons": { "version": "5.2.1", diff --git a/package.json b/package.json index 9c4fcde..39e03fb 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "react-bootstrap": "^2.10.2", "react-dom": "^18.3.1", "react-error-boundary": "^4.0.13", - "react-ga": "^3.3.1", + "react-ga4": "^2.1.0", "react-icons": "^5.2.1", "react-konva": "^18.2.10", "react-redux": "^9.1.2", diff --git a/src/features/app/reactGA.js b/src/features/app/reactGA.js index 983b08e..8e05c35 100644 --- a/src/features/app/reactGA.js +++ b/src/features/app/reactGA.js @@ -1,6 +1,3 @@ -import ReactGA from "react-ga" +import ReactGA from "react-ga4" -ReactGA.initialize("UA-126702426-1", { - debug: false, // Set to true to see debug info in the console -}) -ReactGA.pageview(window.location.pathname + window.location.search) +ReactGA.initialize("UA-126702426-1") diff --git a/src/setupTests.js b/src/setupTests.js index 936f7ec..435d627 100644 --- a/src/setupTests.js +++ b/src/setupTests.js @@ -1,3 +1,3 @@ import "jest-canvas-mock" -jest.mock("react-ga") +jest.mock("react-ga4")