From a00c3c64fa7a7be64544edad960747ff2db680b2 Mon Sep 17 00:00:00 2001 From: gabriel-logan Date: Fri, 14 Jun 2024 04:43:43 -0300 Subject: [PATCH] chore: Add Google tag (gtag.js) for analytics tracking --- docs/src/app/[locale]/layout.tsx | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/docs/src/app/[locale]/layout.tsx b/docs/src/app/[locale]/layout.tsx index e5963de..b70649e 100644 --- a/docs/src/app/[locale]/layout.tsx +++ b/docs/src/app/[locale]/layout.tsx @@ -3,6 +3,7 @@ import "../globals.css"; import { Analytics } from "@vercel/analytics/react"; import { SpeedInsights } from "@vercel/speed-insights/next"; import type { Metadata } from "next"; +import Script from "next/script"; import Adsense from "@/components/Adsense"; import Footer from "@/components/Footer"; @@ -75,6 +76,10 @@ export async function generateMetadata(): Promise { verification: { google: process.env.NEXT_PUBLIC_GOOGLE_SEARCH_CONSOLE_API_KEY, + other: { + "google-adsense-account": process.env + .NEXT_PUBLIC_GOOGLE_ADSENSE_CLIENT_ID as string, + }, }, appleWebApp: { @@ -134,15 +139,25 @@ export default async function RootLayout({ return ( - + {/** */} +