import { Head, Html, Main, NextScript } from 'next/document'

export default function Document() {
    return (
        <Html lang="en">
            <Head />
            <script
                dangerouslySetInnerHTML={{
                    __html: `window.dataLayer = window.dataLayer || [];
                            function gtag(){dataLayer.push(arguments);}
                            gtag('js', new Date());

                            gtag('config', 'G-3J674JFJYN');
  `,
                }}
            />
            <body>
                <noscript
                    dangerouslySetInnerHTML={{
                        __html: `
              <iframe src="https://www.googletagmanager.com/gtag/js?id=G-3J674JFJYN"
              height="0" width="0" style="display:none;visibility:hidden"></iframe>
            `,
                    }}
                />
                <Main />
                <NextScript />
            </body>
        </Html>
    )
}