From 85efea474ce15fa235e472e91ee1f5bdb9045bbd Mon Sep 17 00:00:00 2001 From: Nick Grato Date: Tue, 3 Oct 2023 14:28:44 -0700 Subject: [PATCH] adding GA to marketing (#417) * adding GA to marketing * adding the right code * trying with root url * fixing sandbox --------- Co-authored-by: Nick Grato --- .../layouts/LayoutWrapper/LayoutWrapper.tsx | 37 +++++++++++++++---- marketing/pages/_app.tsx | 23 ++++++++++++ marketing/pages/sandbox/index.tsx | 20 +++++----- marketing/services/analytics.service.ts | 14 +++++++ 4 files changed, 77 insertions(+), 17 deletions(-) create mode 100644 marketing/services/analytics.service.ts diff --git a/marketing/layouts/LayoutWrapper/LayoutWrapper.tsx b/marketing/layouts/LayoutWrapper/LayoutWrapper.tsx index f0d2f0e0..fa21e105 100644 --- a/marketing/layouts/LayoutWrapper/LayoutWrapper.tsx +++ b/marketing/layouts/LayoutWrapper/LayoutWrapper.tsx @@ -3,6 +3,8 @@ import { ThemeContext } from 'contexts/ThemeProvider'; import Nav from '@Navigation/Nav/Nav'; import Footer from '@Navigation/Footer/Footer'; import { NavigationT } from 'types'; +import Head from 'next/head'; +import { GA_TRACKING_ID } from 'services/analytics.service'; type LayoutWrapperPropsT = { navData?: NavigationT; @@ -18,14 +20,33 @@ const LayoutWrapper = ({ navData, children }: LayoutWrapperPropsT) => { const themeContext = useContext(ThemeContext); return ( - // Hard coding light while dark theme is being designed - //
-
-
-
+ <> + + {/* Google Analytics script */} +