Skip to content

Commit 2015189

Browse files
committed
sopkit
1 parent 61d9051 commit 2015189

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/app/layout.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ export const metadata = {
1111
image: "/logo.png",
1212
};
1313

14+
let script = `
15+
window.dataLayer = window.dataLayer || [];
16+
function gtag(){dataLayer.push(arguments);}
17+
gtag('js', new Date());
18+
19+
gtag('config', 'G-E9Q2600LW2');
20+
`;
21+
1422
export default function RootLayout({ children }) {
1523
return (
1624
<html lang="en">
@@ -66,6 +74,10 @@ export default function RootLayout({ children }) {
6674
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1828915420581549"
6775
crossOrigin="anonymous"
6876
></script>
77+
78+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-E9Q2600LW2"></script>
79+
<script dangerouslySetInnerHTML={{ __html: script }}></script>
80+
6981
</head>
7082

7183
<body className={inter.className}>

0 commit comments

Comments
 (0)