Skip to content

Commit

Permalink
Move GA code to a client side part
Browse files Browse the repository at this point in the history
  • Loading branch information
andychase committed Oct 7, 2024
1 parent 07cb142 commit a957264
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 2 additions & 0 deletions pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { appWithTranslation } from 'next-i18next';
import type { AppProps } from 'next/app';
import { Inter } from 'next/font/google';
import { GoogleTagManager } from '@next/third-parties/google'

import '@/styles/globals.css';

Expand All @@ -15,6 +16,7 @@ function App({ Component, pageProps }: AppProps<{}>) {

return (
<div className={inter.className}>
<GoogleTagManager gtmId="GTM-W55ZK7" />
<Toaster />
<QueryClientProvider client={queryClient}>
<Component {...pageProps} />
Expand Down
2 changes: 0 additions & 2 deletions pages/_document.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { DocumentProps, Head, Html, Main, NextScript } from 'next/document';

import i18nextConfig from '../next-i18next.config';
import { GoogleTagManager } from '@next/third-parties/google'


type Props = DocumentProps & {
Expand All @@ -13,7 +12,6 @@ export default function Document(props: Props) {
props.__NEXT_DATA__.locale ?? i18nextConfig.i18n.defaultLocale;
return (
<Html lang={currentLocale}>
<GoogleTagManager gtmId="GTM-W55ZK7" />
<Head>
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-title" content="Gov Chat"></meta>
Expand Down

0 comments on commit a957264

Please sign in to comment.