Skip to content

Commit 69f6838

Browse files
authored
Merge pull request #122 from MBTips/dev
7차 배포 Test (Dev -> Main)
2 parents 24202de + fc7b2ae commit 69f6838

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/App.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ const PageTracker = () => {
4747
const App = () => {
4848
useEffect(() => {
4949
initGA();
50+
console.log("init");
5051
}, []);
5152

5253
return (

src/libs/analytics.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,17 @@ const GA_MEASUREMENT_ID = import.meta.env.VITE_GA_MEASUREMENT_ID || "";
55
const isProduction = import.meta.env.MODE === "production";
66

77
const initGA = () => {
8+
console.log("isProduction", isProduction);
9+
console.log("ID", GA_MEASUREMENT_ID);
810
if (isProduction && GA_MEASUREMENT_ID) {
911
ReactGA.initialize(GA_MEASUREMENT_ID);
1012
}
1113
};
1214

1315
const trackPageView = (path: string) => {
16+
console.log("trackPageView 1");
1417
if (isProduction && GA_MEASUREMENT_ID) {
18+
console.log("trackPageView 2");
1519
ReactGA.send({ hitType: "pageview", page: path });
1620
}
1721
};

0 commit comments

Comments
 (0)