Skip to content

Commit 75867fa

Browse files
authored
Merge pull request #96 from Team-Senifit/release-1.0.1
구글메타태그 추가
2 parents 9715405 + 9cb4a15 commit 75867fa

2 files changed

Lines changed: 29 additions & 3 deletions

File tree

eslint.config.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import react from "eslint-plugin-react";
99
import reactHooks from "eslint-plugin-react-hooks";
1010
import jsxA11y from "eslint-plugin-jsx-a11y";
1111
import prettier from "eslint-plugin-prettier";
12-
import nextPlugin from "@next/eslint-plugin-next"; // ✅ 추가
12+
import nextPlugin from "@next/eslint-plugin-next";
1313

1414
const __filename = fileURLToPath(import.meta.url);
1515
const __dirname = dirname(__filename);
@@ -32,13 +32,13 @@ export default [
3232
],
3333
},
3434

35-
// Next 권장 설정을 가장 먼저 적용(문서 권장)
35+
// Next 권장 설정을 가장 먼저 적용(문서 권장)
3636
...compat.config({
3737
extends: ["next/core-web-vitals", "next/typescript", "prettier"],
3838
}),
3939

4040
{
41-
// 커스텀 룰 적용 블록 - 여기서 @next/next도 등록
41+
// 커스텀 룰 적용 블록 - 여기서 @next/next도 등록
4242
files: ["**/*.{js,jsx,ts,tsx}"],
4343
languageOptions: {
4444
parser: tsParser,

src/app/layout.tsx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import timezone from "dayjs/plugin/timezone";
88
import QueryProviders from "./panel/QueryClientProvider";
99
import LoadingFallback from "./panel/LoadingFallback";
1010
import Toast from "@/components/Toast";
11+
import Script from "next/script";
1112

1213
// dayjs locale 설정, time zone 설정
1314
dayjs.locale("ko");
@@ -55,6 +56,21 @@ export default function RootLayout({
5556
}>) {
5657
return (
5758
<html lang={"ko"}>
59+
<head>
60+
{/* Google Tag Manager */}
61+
<Script
62+
id={"google-tag-manager"}
63+
strategy={"afterInteractive"}
64+
dangerouslySetInnerHTML={{
65+
__html: `(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
66+
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
67+
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
68+
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
69+
})(window,document,'script','dataLayer','GTM-TSB9PTJB');`,
70+
}}
71+
/>
72+
{/* End Google Tag Manager */}
73+
</head>
5874
<body
5975
style={{
6076
margin: 0,
@@ -63,6 +79,16 @@ export default function RootLayout({
6379
height: "100dvh",
6480
}}
6581
>
82+
{/* Google Tag Manager (noscript) */}
83+
<noscript>
84+
<iframe
85+
src={"https://www.googletagmanager.com/ns.html?id=GTM-TSB9PTJB"}
86+
height={"0"}
87+
width={"0"}
88+
style={{ display: "none", visibility: "hidden" }}
89+
></iframe>
90+
</noscript>
91+
{/* End Google Tag Manager (noscript) */}
6692
<Suspense fallback={<LoadingFallback />}>
6793
<QueryProviders>
6894
<SenifitThemeProvider>

0 commit comments

Comments
 (0)