File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { config } from '@fortawesome/fontawesome-svg-core'
3
3
import '@fortawesome/fontawesome-svg-core/styles.css'
4
4
import '@/styles/globals.css'
5
5
import ProfileContainer from '@/components/ProfileContainer'
6
+ import GoogleAnalytics from '@/components/GoogleAnalytics'
6
7
config . autoAddCss = false
7
8
8
9
export default function RootLayout ( {
@@ -25,6 +26,7 @@ export default function RootLayout({
25
26
</ div >
26
27
</ div >
27
28
</ div >
29
+ < GoogleAnalytics />
28
30
</ body >
29
31
</ html >
30
32
)
Original file line number Diff line number Diff line change
1
+ 'use client'
2
+ import Script from 'next/script'
3
+
4
+ export default function GoogleAnalytics ( ) {
5
+ return (
6
+ < >
7
+ < Script async src = { `https://www.googletagmanager.com/gtag/js?id=G-9JLBHQ70PM` } />
8
+ < Script id = "ga-script" >
9
+ { `
10
+ window.dataLayer = window.dataLayer || [];
11
+ function gtag(){dataLayer.push(arguments);}
12
+ gtag('js', new Date());
13
+
14
+ gtag('config', 'G-9JLBHQ70PM');
15
+ ` }
16
+ </ Script >
17
+ </ >
18
+ )
19
+ }
You can’t perform that action at this time.
0 commit comments