Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,23 @@ export default function RootLayout({
}) {
return (
<html lang="en" suppressHydrationWarning>
<head>
{/* 直接在head中添加Google Analytics代码 */}
<script async src="https://www.googletagmanager.com/gtag/js?id=G-MYTMHRN5ME"></script>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you make this an environment variable?

<script
dangerouslySetInnerHTML={{
__html: `
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-MYTMHRN5ME');
`
}}
/>
</head>
<body className="min-h-screen flex flex-col bg-background">
<ThemeProvider attribute="class" defaultTheme="system" enableSystem>
<AnnouncementBar />
{/* Remove the section wrapper as it's interfering with sticky positioning */}
<Suspense
fallback={
<div className="sticky top-0 z-50 w-full border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60">
Expand Down