Skip to content

Commit

Permalink
feat: add gtm
Browse files Browse the repository at this point in the history
  • Loading branch information
chambaz committed Oct 15, 2024
1 parent 975547b commit 2e91c1e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion apps/marginfi-landing-page/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { SpeedInsights } from "@vercel/speed-insights/next";
import { GoogleAnalytics } from "@next/third-parties/google";
import { GoogleAnalytics, GoogleTagManager } from "@next/third-parties/google";

import { Header } from "~/components/header";

Expand All @@ -26,6 +26,7 @@ export default function RootLayout({
{process.env.NEXT_PUBLIC_ANALYTICS === "true" && (
<>
<GoogleAnalytics gaId="G-TS0DF3DM7G" />
<GoogleTagManager gtmId="GTM-53CZ2GG8" />
<SpeedInsights />
</>
)}
Expand Down
3 changes: 2 additions & 1 deletion apps/marginfi-v2-trading/src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import App, { AppContext, AppInitialProps, AppProps } from "next/app";
import { useRouter } from "next/router";
import { SpeedInsights } from "@vercel/speed-insights/next";

import { GoogleAnalytics } from "@next/third-parties/google";
import { GoogleAnalytics, GoogleTagManager } from "@next/third-parties/google";
import { WalletProvider } from "@solana/wallet-adapter-react";
import { WalletModalProvider } from "@solana/wallet-adapter-react-ui";
import { TipLinkWalletAutoConnect } from "@tiplink/wallet-adapter-react-ui";
Expand Down Expand Up @@ -87,6 +87,7 @@ export default function MrgnApp({ Component, pageProps, path, bank }: AppProps &
{process.env.NEXT_PUBLIC_ANALYTICS === "true" && (
<>
<GoogleAnalytics gaId="G-T5B2WRLKL9" />
<GoogleTagManager gtmId="GTM-WFBC4RZ7" />
<SpeedInsights />
</>
)}
Expand Down
3 changes: 2 additions & 1 deletion apps/marginfi-v2-ui/src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react";

import App, { AppContext, AppInitialProps, AppProps } from "next/app";
import { SpeedInsights } from "@vercel/speed-insights/next";
import { GoogleAnalytics } from "@next/third-parties/google";
import { GoogleAnalytics, GoogleTagManager } from "@next/third-parties/google";
import dynamic from "next/dynamic";
import { useRouter } from "next/router";

Expand Down Expand Up @@ -169,6 +169,7 @@ export default function MrgnApp({ Component, pageProps, path }: AppProps & MrgnA
{process.env.NEXT_PUBLIC_ANALYTICS === "true" && ready && (
<>
<GoogleAnalytics gaId="G-0ZTQRWVG02" />
<GoogleTagManager gtmId="GTM-KJJ3CR6Q" />
<SpeedInsights />
</>
)}
Expand Down

0 comments on commit 2e91c1e

Please sign in to comment.