Skip to content

Commit

Permalink
Add gtag
Browse files Browse the repository at this point in the history
  • Loading branch information
rocktimsaikia committed Dec 26, 2024
1 parent 584c530 commit af04cd2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions client/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { GoogleAnalytics } from "@next/third-parties/google";
import { GoogleTagManager, GoogleAnalytics } from "@next/third-parties/google";
import { Theme } from "@radix-ui/themes";
import "@radix-ui/themes/styles.css";
import Router from "next/router";
Expand Down Expand Up @@ -33,7 +33,12 @@ export default function MyApp({ Component, pageProps }) {
>
<Component {...pageProps} />
</Theme>
{isProduction && <GoogleAnalytics gaId="G-QRVCN5446L" />}
{isProduction && (
<>
<GoogleAnalytics gaId="G-QRVCN5446L" />
<GoogleTagManager gtmId="G-QRVCN5446L" />
</>
)}
</>
);
}

0 comments on commit af04cd2

Please sign in to comment.