@@ -11,6 +11,7 @@ import '@/styles/plyr.css';
11
11
import { Analytics } from '@vercel/analytics/react' ;
12
12
import { Viewport } from 'next' ;
13
13
import { Inter as FontSans } from 'next/font/google' ;
14
+ import Script from 'next/script' ;
14
15
15
16
const fontSans = FontSans ( {
16
17
subsets : [ 'latin' ] ,
@@ -46,10 +47,28 @@ export default async function RootLayout({
46
47
} ) {
47
48
return (
48
49
< html lang = { ( lang && lang [ 0 ] ) || defaultLocale } suppressHydrationWarning >
49
- < head />
50
- < body className = { cn ( 'min-h-screen font-sans antialiased' , fontSans . variable ) }
51
- // style={{background: 'var(--background-gradient)'}}
52
- >
50
+ < head >
51
+ < Script
52
+ id = "gtm-script"
53
+ strategy = "afterInteractive"
54
+ dangerouslySetInnerHTML = { {
55
+ __html : `(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
56
+ new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
57
+ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
58
+ 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
59
+ })(window,document,'script','dataLayer','GTM-W9HPZZ22');`
60
+ } }
61
+ />
62
+ </ head >
63
+ < body className = { cn ( 'min-h-screen font-sans antialiased' , fontSans . variable ) } >
64
+ < noscript >
65
+ < iframe
66
+ src = "https://www.googletagmanager.com/ns.html?id=GTM-W9HPZZ22"
67
+ height = "0"
68
+ width = "0"
69
+ style = { { display : 'none' , visibility : 'hidden' } }
70
+ > </ iframe >
71
+ </ noscript >
53
72
< ThemeProvider attribute = "class" defaultTheme = { siteConfig . nextThemeColor } enableSystem >
54
73
{ children }
55
74
{ /* <Footer /> */ }
0 commit comments