From 0946a7795743312c357ccaae995ee3902128a6bf Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Wed, 7 Dec 2022 18:57:59 +0200 Subject: [PATCH] Add GA --- app/root.tsx | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/app/root.tsx b/app/root.tsx index e19849584..ed2c6b7a0 100644 --- a/app/root.tsx +++ b/app/root.tsx @@ -131,6 +131,7 @@ function Document({ + @@ -202,6 +203,33 @@ export const ErrorBoundary: ErrorBoundaryComponent = ({ error }) => { ); }; +function GTM() { + const id = process.env["GTM_ID"]; + + if (!id) return null; + + return ( + <> + + + ); +} + function Fonts() { return ( <>