mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-22 06:37:56 +01:00
Change GA deprecated code.
This commit is contained in:
parent
a9bcfce52c
commit
7cb4a93387
@ -26,7 +26,11 @@ declare module '@mui/styles/defaultTheme' {
|
||||
}
|
||||
|
||||
// Google Analytics Initialization.
|
||||
ReactGA.initialize(AppConfig.getGoogleAnalyticsAccount());
|
||||
ReactGA.initialize([
|
||||
{
|
||||
trackingId: AppConfig.getGoogleAnalyticsAccount(),
|
||||
}
|
||||
]);
|
||||
|
||||
const queryClient = new QueryClient({
|
||||
defaultOptions: {
|
||||
|
@ -23,7 +23,7 @@ const EditorPage = ({ isTryMode }: EditorPropsType): React.ReactElement => {
|
||||
const client: Client = useSelector(activeInstance);
|
||||
|
||||
useEffect(() => {
|
||||
ReactGA.pageview(window.location.pathname + window.location.search);
|
||||
ReactGA.send({ hitType: "pageview", page: window.location.pathname});
|
||||
}, []);
|
||||
|
||||
const findEditorMode = (isTryMode: boolean, mapId: number): EditorRenderMode | null => {
|
||||
|
@ -80,7 +80,7 @@ const ForgotPasswordPage = (): React.ReactElement => {
|
||||
const intl = useIntl();
|
||||
useEffect(() => {
|
||||
document.title = intl.formatMessage({ id: 'forgot.page-title', defaultMessage: 'Forgot Password | WiseMapping' });
|
||||
ReactGA.pageview(window.location.pathname + window.location.search);
|
||||
ReactGA.send({ hitType: "pageview", page: window.location.pathname});
|
||||
},[]);
|
||||
|
||||
return (
|
||||
|
@ -70,7 +70,7 @@ const LoginPage = (): React.ReactElement => {
|
||||
|
||||
useEffect(() => {
|
||||
document.title = intl.formatMessage({id:'login.page-title',defaultMessage:'Login | WiseMapping'});
|
||||
ReactGA.pageview(window.location.pathname + window.location.search);
|
||||
ReactGA.send({ hitType: "pageview", page: window.location.pathname});
|
||||
},[]);
|
||||
|
||||
return (
|
||||
|
@ -83,7 +83,7 @@ const MapsPage = (): ReactElement => {
|
||||
id: 'maps.page-title',
|
||||
defaultMessage: 'My Maps | WiseMapping',
|
||||
});
|
||||
ReactGA.pageview(window.location.pathname + window.location.search);
|
||||
ReactGA.send({ hitType: "pageview", page: window.location.pathname});
|
||||
}, []);
|
||||
|
||||
const mutation = useMutation((id: number) => client.deleteLabel(id), {
|
||||
|
@ -165,7 +165,7 @@ const RegistationPage = (): React.ReactElement => {
|
||||
id: 'registration.page-title',
|
||||
defaultMessage: 'Registration | WiseMapping',
|
||||
});
|
||||
ReactGA.pageview(window.location.pathname + window.location.search);
|
||||
ReactGA.send({ hitType: "pageview", page: window.location.pathname});
|
||||
},[]);
|
||||
|
||||
return (
|
||||
|
Loading…
Reference in New Issue
Block a user