@@ -26,36 +26,36 @@ const PageTracker = () => {
2626 const { pathname, state } = location ;
2727
2828 const trackedPaths = [
29- { path : "/" , page : "홈" , element : "" } ,
30- { path : "/login" , page : "로그인/회원가입" , element : "로그인" } ,
31- { path : "/contents" , page : "일반콘텐츠" , element : "" } ,
32- { path : "/my-info" , page : "내 정보" , element : "" } ,
33- { path : "/chat" , page : "채팅방" , element : "" } ,
34- { path : "/select-info" , page : "빠른 대화 설정" , element : "" } ,
35- { path : "/select-info" , page : "친구 저장" , element : "대화 시작하기" }
29+ { path : "/" , page : "홈" } ,
30+ { path : "/login" , page : "로그인/회원가입" } ,
31+ { path : "/contents" , page : "일반콘텐츠" } ,
32+ { path : "/my-info" , page : "내 정보" } ,
33+ { path : "/chat" , page : "채팅방" } ,
34+ { path : "/select-info" , page : "빠른 대화 설정" } ,
35+ { path : "/select-info" , page : "친구 저장" }
3636 ] ;
3737
3838 useEffect ( ( ) => {
3939 const trackedContentPaths = [ "/contents/1" , "/contents/2" ] ;
4040
41- trackedPaths . forEach ( ( { path, page, element } ) => {
41+ trackedPaths . forEach ( ( { path, page } ) => {
4242 // 콘텐츠 상세 페이지 (일반 콘텐츠만 추적)
4343 if ( trackedContentPaths . includes ( pathname ) ) {
4444 if ( path === "/contents" ) {
45- trackPageView ( path , { page, element } ) ;
45+ trackPageView ( path , page ) ;
4646 }
4747 }
4848 // select-info 페이지에서 state로 분기
4949 else if ( pathname === "/select-info" && path === pathname ) {
5050 if ( state === "fastFriend" && page === "빠른 대화 설정" ) {
51- trackPageView ( path , { page, element } ) ;
51+ trackPageView ( path , page ) ;
5252 } else if ( state === "virtualFriend" && page === "친구 저장" ) {
53- trackPageView ( path , { page, element } ) ;
53+ trackPageView ( path , page ) ;
5454 }
5555 }
5656 // 나머지 일반 path
5757 else if ( pathname === path && path !== "/select-info" ) {
58- trackPageView ( path , { page, element } ) ;
58+ trackPageView ( path , page ) ;
5959 }
6060 } ) ;
6161 } , [ location . pathname , location . state ] ) ;
@@ -84,7 +84,7 @@ const App = () => {
8484 < Route path = "/login" element = { < Login /> } />
8585 < Route path = "/my-info" element = { < MyInfo /> } />
8686 < Route path = "/kakao-login" element = { < KaKaoLogin /> } />
87- < Route path = "/mbti-test" element = { < MbtiTestIntro /> } />
87+ < Route path = "/mbti-test" element = { < MbtiTestIntro /> } />
8888 < Route path = "/mbti-test-progress" element = { < MbtiTestQuestions /> } />
8989 < Route path = "/mbti-test-result" element = { < MbtiTestResult /> } />
9090 </ Routes >
0 commit comments