File tree Expand file tree Collapse file tree 5 files changed +55
-81
lines changed
Expand file tree Collapse file tree 5 files changed +55
-81
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ import Provider from "./provider";
55import { Toaster } from "sonner" ;
66import { ThemeProvider } from "@/components/theme-provider" ;
77import { baseMetadata , jsonLdSchema } from "@/utils/metadata" ;
8+ import Script from "next/script" ;
9+ import { Analytics } from "@vercel/analytics/react"
810
911const geistSans = Geist ( {
1012 variable : "--font-geist-sans" ,
@@ -37,6 +39,22 @@ export default function RootLayout({
3739 return (
3840 < html lang = "en" >
3941 < head >
42+ < Script
43+ strategy = "afterInteractive"
44+ src = "https://www.googletagmanager.com/gtag/js?id=G-85S7XMW3W2"
45+ />
46+ < Script
47+ id = "google-analytics"
48+ strategy = "afterInteractive"
49+ dangerouslySetInnerHTML = { {
50+ __html : `
51+ window.dataLayer = window.dataLayer || [];
52+ function gtag(){dataLayer.push(arguments);}
53+ gtag('js', new Date());
54+ gtag('config', 'G-85S7XMW3W2');
55+ ` ,
56+ } }
57+ />
4058 < script
4159 type = "application/ld+json"
4260 dangerouslySetInnerHTML = { {
@@ -53,6 +71,7 @@ export default function RootLayout({
5371 </ ThemeProvider >
5472 < Toaster />
5573 </ Provider >
74+ < Analytics />
5675 </ body >
5776 </ html >
5877 ) ;
Original file line number Diff line number Diff line change @@ -141,6 +141,7 @@ export class CanvasEngine {
141141 if ( ! this . isStandalone && this . token && this . roomId ) {
142142 console . log ( "✅Connecting to WebSocket…" ) ;
143143 this . connectWebSocket ( ) ;
144+ console . log ( "✅Connected to WebSocket…" ) ;
144145 }
145146 }
146147
@@ -1047,9 +1048,6 @@ export class CanvasEngine {
10471048 textarea . style . width = `${ Math . max ( span ! . offsetWidth + 10 , 50 ) } px` ;
10481049 textarea . style . height = `${ Math . max ( span ! . offsetHeight , 20 ) } px` ;
10491050 } ) ;
1050-
1051- console . log ( "span.offsetWidth= " , span . offsetWidth ) ;
1052- console . log ( "textarea.style.width= " , textarea . style . width ) ;
10531051 } ;
10541052
10551053 textarea . addEventListener ( "input" , ( ) => {
Original file line number Diff line number Diff line change 2121 "@radix-ui/react-separator" : " ^1.1.2" ,
2222 "@radix-ui/react-slot" : " ^1.1.2" ,
2323 "@radix-ui/react-tooltip" : " ^1.1.8" ,
24+ "@vercel/analytics" : " ^1.5.0" ,
2425 "axios" : " ^1.7.9" ,
2526 "bcrypt" : " ^5.1.1" ,
2627 "class-variance-authority" : " ^0.7.1" ,
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments