Add GA4, GTM and Search Console verification
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { Suspense } from "react";
|
||||
import type { Metadata, Viewport } from "next";
|
||||
import { Inter } from "next/font/google";
|
||||
import Script from "next/script";
|
||||
import "./globals.css";
|
||||
import SiteHeader from "@/components/site-header";
|
||||
import SiteFooter from "@/components/site-footer";
|
||||
@@ -22,6 +23,9 @@ export const metadata: Metadata = {
|
||||
},
|
||||
description,
|
||||
alternates: { canonical: "/" },
|
||||
verification: {
|
||||
google: "LnRawiMDpDtTVBC2X34We70f8OHBLMVC6e9IWoHCZLs",
|
||||
},
|
||||
openGraph: {
|
||||
type: "website",
|
||||
url: "/",
|
||||
@@ -40,6 +44,31 @@ export default function RootLayout({ children }: LayoutProps<"/">) {
|
||||
return (
|
||||
<html lang="en" className={inter.variable} data-scroll-behavior="smooth">
|
||||
<body>
|
||||
<Script id="gtm" strategy="afterInteractive">
|
||||
{`(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
|
||||
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
|
||||
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
||||
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
|
||||
})(window,document,'script','dataLayer','GTM-TP5FCVMQ');`}
|
||||
</Script>
|
||||
<Script
|
||||
src="https://www.googletagmanager.com/gtag/js?id=G-H7CB0B2RRS"
|
||||
strategy="afterInteractive"
|
||||
/>
|
||||
<Script id="ga4" strategy="afterInteractive">
|
||||
{`window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
gtag('config', 'G-H7CB0B2RRS');`}
|
||||
</Script>
|
||||
<noscript>
|
||||
<iframe
|
||||
src="https://www.googletagmanager.com/ns.html?id=GTM-TP5FCVMQ"
|
||||
height="0"
|
||||
width="0"
|
||||
style={{ display: "none", visibility: "hidden" }}
|
||||
/>
|
||||
</noscript>
|
||||
<a href="#main" className="skip-link">
|
||||
Skip to content
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user