Skip to content

Commit

Permalink
refactor: Google Analytics 연동 리팩토링
Browse files Browse the repository at this point in the history
  • Loading branch information
ArpaAP committed Sep 10, 2024
1 parent 6794087 commit 016921b
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 12 deletions.
10 changes: 0 additions & 10 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,7 @@
<meta name="viewport" content="initial-scale=1.0,user-scalable=no,maximum-scale=1,width=device-width" />
<title>동BTI</title>
</head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-LLMBJD2PDC"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag("js", new Date());

gtag("config", "G-LLMBJD2PDC");
</script>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
Expand Down
13 changes: 12 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"start-server-and-test": "^2.0.5",
"ts-node": "^10.9.2",
"typescript": "^5.0.2",
"vite": "^4.4.0"
"vite": "^4.4.0",
"vite-plugin-radar": "^0.9.6"
}
}
6 changes: 6 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import path from "path";
import { visualizer } from "rollup-plugin-visualizer";
import { defineConfig } from "vite";
import { VitePluginRadar } from "vite-plugin-radar";

import react from "@vitejs/plugin-react";

Expand All @@ -17,6 +18,11 @@ export default defineConfig({
filename: "./docs/bundle.html",
open: true,
}),
VitePluginRadar({
analytics: {
id: "G-LLMBJD2PDC",
},
}),
],
resolve: {
alias: {
Expand Down

0 comments on commit 016921b

Please sign in to comment.