11import { lazy , useCallback , useEffect , useMemo } from 'react' ;
22import { parse as jsUrlParse , stringify as jsUrlStringify } from 'jsurl2' ;
3- import { Helmet , HelmetProvider } from 'react-helmet-async' ;
3+ import { HelmetProvider } from 'react-helmet-async' ;
44import { ToastContainer } from 'react-toastify' ;
55import SuperTokens , { SuperTokensWrapper } from 'supertokens-auth-react' ;
66import Session from 'supertokens-auth-react/recipe/session' ;
@@ -10,7 +10,6 @@ import { LoadingAPIIndicator } from '@/components/common/LoadingAPI';
1010import { Toaster } from '@/components/ui/toaster' ;
1111import { frontendConfig } from '@/config/supertokens/frontend' ;
1212import { env } from '@/env/frontend' ;
13- import * as gtag from '@/lib/gtag' ;
1413import { urqlClient } from '@/lib/urql' ;
1514import { configureScope , init } from '@sentry/react' ;
1615import { QueryClient , QueryClientProvider } from '@tanstack/react-query' ;
@@ -121,24 +120,6 @@ function RootComponent() {
121120
122121 return (
123122 < HelmetProvider >
124- { env . analytics . googleAnalyticsTrackingId && (
125- < Helmet >
126- < script id = "gtag-init" key = "gtag-init" type = "text/javascript" > { `
127- window.dataLayer = window.dataLayer || [];
128- function gtag(){dataLayer.push(arguments);}
129- gtag('js', new Date());
130- gtag('config', '${ env . analytics . googleAnalyticsTrackingId } ', {
131- page_path: window.location.pathname,
132- });
133- ` } </ script >
134- < script
135- key = "gtag-script"
136- async
137- src = { `https://www.googletagmanager.com/gtag/js?id=${ env . analytics . googleAnalyticsTrackingId } ` }
138- type = "text/javascript"
139- />
140- </ Helmet >
141- ) }
142123 < Toaster />
143124 < SuperTokensWrapper >
144125 < QueryClientProvider client = { queryClient } >
@@ -985,7 +966,3 @@ export const router = createRouter({
985966 return JSON . stringify ( search ) ;
986967 } ) ,
987968} ) ;
988-
989- router . history . subscribe ( ( ) => {
990- gtag . pageview ( router . history . location . href ) ;
991- } ) ;
0 commit comments