Skip to content

Commit 571cf2f

Browse files
committed
feat: gtm
1 parent 2bacd26 commit 571cf2f

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

index.html

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,33 @@
4444
gtag("js", new Date());
4545
gtag("config", "G-G5XZB713D0");
4646
</script>
47+
<!-- Google Tag Manager -->
48+
<script>
49+
(function (w, d, s, l, i) {
50+
w[l] = w[l] || [];
51+
w[l].push({ "gtm.start": new Date().getTime(), event: "gtm.js" });
52+
var f = d.getElementsByTagName(s)[0],
53+
j = d.createElement(s),
54+
dl = l != "dataLayer" ? "&l=" + l : "";
55+
j.async = true;
56+
j.src = "https://www.googletagmanager.com/gtm.js?id=" + i + dl;
57+
f.parentNode.insertBefore(j, f);
58+
})(window, document, "script", "dataLayer", "GTM-NWKKWJ2H");
59+
</script>
60+
<!-- End Google Tag Manager -->
4761
<script src="https://developers.kakao.com/sdk/js/kakao.js"></script>
4862
</head>
4963
<body>
64+
<!-- Google Tag Manager (noscript) -->
65+
<noscript
66+
><iframe
67+
src="https://www.googletagmanager.com/ns.html?id=GTM-NWKKWJ2H"
68+
height="0"
69+
width="0"
70+
style="display: none; visibility: hidden"
71+
></iframe
72+
></noscript>
73+
<!-- End Google Tag Manager (noscript) -->
5074
<div id="root"></div>
5175
<script type="module" src="/src/main.tsx"></script>
5276
</body>

vite.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import svgrPlugin from "vite-plugin-svgr";
77
export default defineConfig({
88
plugins: [react(), svgrPlugin()],
99
build: {
10-
outDir: "/home/ubuntu/needu_new/build",
11-
// outDir: "./build",
10+
// outDir: "/home/ubuntu/needu_new/build",
11+
outDir: "../build",
1212
},
1313
resolve: {
1414
alias: [

0 commit comments

Comments
 (0)