diff --git a/packages/web/config.ts b/packages/web/config.ts index 1479030c..0c53546c 100644 --- a/packages/web/config.ts +++ b/packages/web/config.ts @@ -19,4 +19,5 @@ export const CONFIG = { brightIdNodeUrl: process.env.NEXT_BRIGHTID_NODE_URL || 'http:%2f%2fnode.brightid.org', publicUrl: process.env.NEXT_PUBLIC_VERCEL_URL || 'http://localhost:3000', + gaId: process.env.NEXT_PUBLIC_GA4_ID || undefined, }; diff --git a/packages/web/pages/_app.tsx b/packages/web/pages/_app.tsx index ea29d749..824cd174 100644 --- a/packages/web/pages/_app.tsx +++ b/packages/web/pages/_app.tsx @@ -1,6 +1,8 @@ +/* eslint-disable react/no-danger */ import { ChakraProvider, CSSReset, MetaTheme } from '@metafam/ds'; import { MobileFooter } from 'components/MobileFooter'; import { PageHeader } from 'components/PageHeader'; +import { CONFIG } from 'config'; import { Web3ContextProvider } from 'contexts/Web3Context'; import Head from 'next/head'; import { WithUrqlProps } from 'next-urql'; @@ -18,6 +20,25 @@ const App: React.FC = ({ MetaGame + {CONFIG.gaId != null && ( + <> +