Skip to content

Commit

Permalink
feat: add google analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
Dun-sin committed Jul 13, 2024
1 parent 81cf6d4 commit 58396be
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"nsfwjs": "^2.4.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-ga4": "^2.1.0",
"react-icons": "^4.10.1",
"react-loading-icons": "^1.1.0",
"react-router-dom": "^6.15.0",
Expand Down
3 changes: 3 additions & 0 deletions client/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { useEffect, useState } from 'react';
import { Navigate, Route, Routes } from 'react-router-dom';

import { KindeProvider } from '@kinde-oss/kinde-auth-react';
import ReactGA from 'react-ga4';

// Store
import { useAuth } from 'context/AuthContext';
Expand All @@ -26,6 +27,8 @@ import useIsTabActive from './hooks/useIsTabActive';
const clientID = import.meta.env.VITE_IMPORTANT;

function App() {
ReactGA.initialize('G-HL8CN4JFXN');

const { isLoggedIn, dispatchAuth } = useAuth();
const { loadUserSettings, updateOnlineStatus, app } = useApp();

Expand Down

0 comments on commit 58396be

Please sign in to comment.