Skip to content

Commit ab809e2

Browse files
committed
Fix analytics
1 parent 7a33e85 commit ab809e2

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/pages/_app.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@ import {
1717
StorageNotificationsRepository
1818
} from '@/context/AppNotificationContext'
1919
import { CustomSnackBar as AppNotification } from '@/view/components/Snackbar'
20-
import { DAPP_CONFIG } from '@/constants/config'
20+
import { ANALYTICS_ID, DAPP_CONFIG } from '@/constants/config'
2121
import { UseInkProvider } from 'useink'
2222
import { CHAINS } from '@/constants/chains'
2323
import { LocalDbProvider } from '@/context/LocalDbContext'
2424
import { Inter } from 'next/font/google'
25+
import { GoogleAnalytics } from '@next/third-parties/google'
2526

2627
type CustomAppProps = AppProps & {
2728
emotionCache: EmotionCache
@@ -79,6 +80,7 @@ export default function App(props: CustomAppProps) {
7980
</NetworkAccountsContextProvider>
8081
</LocalDbProvider>
8182
</UseInkProvider>
83+
{ANALYTICS_ID && <GoogleAnalytics gaId={ANALYTICS_ID} />}
8284
</CacheProvider>
8385
</div>
8486
)

src/pages/_document.tsx

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
import { Html, Head, Main, NextScript } from 'next/document'
2-
import { GoogleAnalytics } from '@next/third-parties/google'
3-
import { ANALYTICS_ID } from '@/constants'
42

53
export default function Document() {
64
return (
@@ -16,7 +14,6 @@ export default function Document() {
1614
<Main />
1715
<NextScript />
1816
</body>
19-
{ANALYTICS_ID && <GoogleAnalytics gaId={ANALYTICS_ID} />}
2017
</Html>
2118
)
2219
}

0 commit comments

Comments
 (0)