Skip to content

Commit d38f810

Browse files
committed
feat: Added google analytics tag
1 parent c6c36be commit d38f810

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

src/app/layout.tsx

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import Script from 'next/script';
12
import type { Metadata } from 'next';
23

34
import { ThemeProvider } from '@/components/theme-provider';
@@ -7,8 +8,8 @@ import '../styles/globals.css';
78

89
export const metadata: Metadata = {
910
title: 'RepoTree - ASCII Tree Generator',
10-
description:
11-
'RepoTree is a web app for generating an ASCII tree from a GitHub URL.',
11+
description: 'RepoTree is a web app for generating an ASCII tree from a GitHub URL.',
12+
authors: [{ name: 'Ralph Rosael' }],
1213
};
1314

1415
export default function RootLayout({
@@ -18,6 +19,21 @@ export default function RootLayout({
1819
}>) {
1920
return (
2021
<html lang="en" suppressHydrationWarning>
22+
<head>
23+
{/* Google Tag (gtag.js) */}
24+
<Script
25+
src="https://www.googletagmanager.com/gtag/js?id=G-7PSC7S1M55"
26+
strategy="afterInteractive"
27+
/>
28+
<Script id="google-analytics" strategy="afterInteractive">
29+
{`
30+
window.dataLayer = window.dataLayer || [];
31+
function gtag(){dataLayer.push(arguments);}
32+
gtag('js', new Date());
33+
gtag('config', 'G-7PSC7S1M55');
34+
`}
35+
</Script>
36+
</head>
2137
<body className="antialiased">
2238
<ThemeProvider attribute="class" defaultTheme="system" enableSystem>
2339
{children}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy