Skip to content

Commit

Permalink
added correct google analytics code and env
Browse files Browse the repository at this point in the history
  • Loading branch information
Neon-20 committed Nov 30, 2023
1 parent e41fbe9 commit b2b8f1c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NEXT_PUBLIC_GOOGLE_ANALYTICS = ""
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ yarn-error.log*

# local env files
.env*.local
.env

# vercel
.vercel
Expand Down
4 changes: 3 additions & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ export default function RootLayout({
function gtag(){window.dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-7NXTY5KCKL');
gtag('config', '${process.env.NEXT_PUBLIC_GOOGLE_ANALYTICS}',{
page_path: window.location.pathname,
});
`}
</Script>
<body>
Expand Down

0 comments on commit b2b8f1c

Please sign in to comment.