From e24c89d70414707815327240871944454e466d84 Mon Sep 17 00:00:00 2001 From: junjeong Date: Thu, 24 Apr 2025 16:37:04 +0900 Subject: [PATCH 01/15] =?UTF-8?q?feat:=20mbti=20=ED=85=8C=EC=8A=A4?= =?UTF-8?q?=ED=8A=B8=20=EA=B4=80=EB=A0=A8=20=ED=8E=98=EC=9D=B4=EC=A7=80,?= =?UTF-8?q?=20=EB=8C=80=ED=99=94=20tips=20=EA=B4=80=EB=A0=A8=20=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80trackedView=EC=97=90=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/App.tsx b/src/App.tsx index 0b07641..a252bc7 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -33,7 +33,12 @@ const PageTracker = () => { { path: "/my-info", page: "내 정보" }, { path: "/chat", page: "채팅방" }, { path: "/select-info", page: "빠른 대화 설정" }, - { path: "/select-info", page: "친구 저장" } + { path: "/mbti-test", page: "Mbti 테스트 첫 화면" }, + { path: "/mbti-progress", page: "Mbti 테스트 진행중" }, + { path: "/mbti-result", page: "Mbti 테스트 결과" }, + { path: "/chat-recommend", page: "대화 주제 추천" }, + { path: "/chat-tips", page: "대화 꿀팁" }, + { path: "/chat-temporature", page: "대화 온도 측정" } ]; useEffect(() => { From bc90ce43369697339983e7f91e8d183a87023dbd Mon Sep 17 00:00:00 2001 From: junjeong Date: Thu, 24 Apr 2025 16:44:39 +0900 Subject: [PATCH 02/15] =?UTF-8?q?feat:=20mbti-test-progress=20=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20useEffect=EB=A1=9C=20=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=20=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=EC=97=90?= =?UTF-8?q?=EC=84=9C=20pageView=20=EA=B4=80=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/MbtiTestQuestions.tsx | 44 +++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/src/pages/MbtiTestQuestions.tsx b/src/pages/MbtiTestQuestions.tsx index ab0655c..cf4bc71 100644 --- a/src/pages/MbtiTestQuestions.tsx +++ b/src/pages/MbtiTestQuestions.tsx @@ -1,7 +1,10 @@ +import { useEffect } from "react"; +import { trackPageView } from "@/libs/analytics"; import { TEST_QNA } from "@/constants/TEST_QNA"; import MbtiAnswerButtons from "@/components/button/MbtiAnswerButtons"; import useMbtiTestState from "@/store/useMbtiTestState"; import Header from "@/components/header/Header"; +import Error from "@/pages/Error"; interface content { number: number; @@ -15,31 +18,36 @@ interface content { const MbtiTestQuestions = () => { const { currentPage } = useMbtiTestState(); + useEffect(() => { + const pageName = `MBTI 테스트 진행중 - Step ${currentPage}`; + trackPageView("/mbti-progress", pageName); + }, [currentPage]); + if (currentPage) { const content: content = TEST_QNA[Number(currentPage) - 1]; return ( -
-
-
- - {content.number}/12 - -

- {content.question} -

- mbti 테스트 과정 이미지 -
- -
+
+
+
+ + {content.number}/12 + +

+ {content.question} +

+ mbti 테스트 과정 이미지 +
+ +
); - } else return
404 error
; + } else return ; }; export default MbtiTestQuestions; From fa833300fe390d61ce378c22fd77d6fb6395e01c Mon Sep 17 00:00:00 2001 From: junjeong Date: Thu, 24 Apr 2025 17:01:08 +0900 Subject: [PATCH 03/15] =?UTF-8?q?Mbti=20intro=20=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=20=EC=8B=9C=EC=9E=91=ED=95=98=EA=B8=B0=20=EB=B2=84?= =?UTF-8?q?=ED=8A=BC,=20Mbti=20=EA=B2=B0=EA=B3=BC=20=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=20=EB=8F=8C=EC=95=84=EA=B0=80=EA=B8=B0=20=EB=B2=84?= =?UTF-8?q?=ED=8A=BC+=EA=B3=B5=EC=9C=A0=ED=95=98=EA=B8=B0=20=EB=B2=84?= =?UTF-8?q?=ED=8A=BC=20Click=20=EC=9D=B4=EB=B2=A4=ED=8A=B8=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/button/RestartButton.tsx | 27 +++++++++++++++---------- src/components/button/ShareButton.tsx | 10 ++++++++- src/pages/MbtiTestIntro.tsx | 5 +++++ src/utils/trackClickEvent.ts | 10 +++++++++ 4 files changed, 40 insertions(+), 12 deletions(-) create mode 100644 src/utils/trackClickEvent.ts diff --git a/src/components/button/RestartButton.tsx b/src/components/button/RestartButton.tsx index 7f00e3d..3c793eb 100644 --- a/src/components/button/RestartButton.tsx +++ b/src/components/button/RestartButton.tsx @@ -1,17 +1,22 @@ import { useNavigate } from "react-router-dom"; +import trackClickEvent from "@/utils/trackClickEvent"; const RestartButton = () => { - const navigate = useNavigate(); + const navigate = useNavigate(); - const goFirstStep = () => { - navigate("/mbti-test"); - } + const goFirstStep = () => { + trackClickEvent("/MBTI 테스트 결과", "돌아가기 버튼"); + navigate("/mbti-test"); + }; - return ( - - ) -} + return ( + + ); +}; -export default RestartButton; \ No newline at end of file +export default RestartButton; diff --git a/src/components/button/ShareButton.tsx b/src/components/button/ShareButton.tsx index e461aa3..7d8425d 100644 --- a/src/components/button/ShareButton.tsx +++ b/src/components/button/ShareButton.tsx @@ -1,12 +1,20 @@ import { useState } from "react"; import ShareModal from "@/components/modal/ShareModal"; +import trackClickEvent from "@/utils/trackClickEvent"; const ShareButton = () => { const [shareModalIsOpen, setShareModalIsOpen] = useState(false); + const handleClick = () => { + setShareModalIsOpen(true); + trackClickEvent("MBTI 테스트 결과", "공유하기 버튼"); + }; return ( <> - {shareModalIsOpen && ( diff --git a/src/pages/MbtiTestIntro.tsx b/src/pages/MbtiTestIntro.tsx index d32567a..45a880b 100644 --- a/src/pages/MbtiTestIntro.tsx +++ b/src/pages/MbtiTestIntro.tsx @@ -2,6 +2,8 @@ import { ChangeEvent, FormEvent, useState } from "react"; import { useNavigate } from "react-router-dom"; import Header from "@/components/header/Header"; import useLayoutSize from "@/hooks/useLayoutSize"; +import trackClickEvent from "@/utils/trackClickEvent"; + const MbtiTestIntro = () => { const [name, setName] = useState(""); const navigate = useNavigate(); @@ -59,6 +61,9 @@ const MbtiTestIntro = () => { diff --git a/src/utils/trackClickEvent.ts b/src/utils/trackClickEvent.ts new file mode 100644 index 0000000..236d67b --- /dev/null +++ b/src/utils/trackClickEvent.ts @@ -0,0 +1,10 @@ +import { trackEvent } from "@/libs/analytics"; + +const trackClickEvent = (page: string, element: string) => { + trackEvent("Click", { + page: page, + element: element + }); +}; + +export default trackClickEvent; From b85940fde9d97cb0c58b676addd4a937bd1e9bfe Mon Sep 17 00:00:00 2001 From: junjeong Date: Thu, 24 Apr 2025 17:02:04 +0900 Subject: [PATCH 04/15] =?UTF-8?q?=EC=B9=B4=EC=B9=B4=EC=98=A4=20=EB=A1=9C?= =?UTF-8?q?=EA=B7=B8=EC=9D=B8=20=EB=B2=84=ED=8A=BC=20Click=20=EC=9D=B4?= =?UTF-8?q?=EB=B2=A4=ED=8A=B8=20=ED=95=A0=EB=8B=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/button/KakaoLoginButton.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/button/KakaoLoginButton.tsx b/src/components/button/KakaoLoginButton.tsx index cec87b4..91599e4 100644 --- a/src/components/button/KakaoLoginButton.tsx +++ b/src/components/button/KakaoLoginButton.tsx @@ -1,3 +1,5 @@ +import trackClickEvent from "@/utils/trackClickEvent"; + const KakaoLoginButton = () => { const kakaoRestApiKey = import.meta.env.VITE_KAKAO_REST_API_KEY; const kakaoRedirectUrl = import.meta.env.VITE_KAKAO_REDIRECT_URI; @@ -5,6 +7,7 @@ const KakaoLoginButton = () => { const kakaoURL = `https://kauth.kakao.com/oauth/authorize?client_id=${kakaoRestApiKey}&redirect_uri=${kakaoRedirectUrl}&response_type=code`; const handleClick = () => { + trackClickEvent("로그인/회원가입", "카카오 로그인 버튼"); window.location.href = kakaoURL; }; From c9c9fc689547dea0e0a68f2b8813b89052e050e6 Mon Sep 17 00:00:00 2001 From: junjeong Date: Thu, 24 Apr 2025 17:06:04 +0900 Subject: [PATCH 05/15] =?UTF-8?q?chat=20=ED=8E=98=EC=9D=B4=EC=A7=80?= =?UTF-8?q?=EC=9D=98=20Chat=20tips=20=EB=A9=94=EB=89=B4=EB=B0=94=20Click?= =?UTF-8?q?=20=EC=9D=B4=EB=B2=A4=ED=8A=B8=20=ED=95=A0=EB=8B=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/tips/TipsMenu.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/tips/TipsMenu.tsx b/src/components/tips/TipsMenu.tsx index bfd5e8b..f1bc95c 100644 --- a/src/components/tips/TipsMenu.tsx +++ b/src/components/tips/TipsMenu.tsx @@ -1,3 +1,4 @@ +import trackClickEvent from "@/utils/trackClickEvent"; import { Link } from "react-router-dom"; const TipsMenu = ({ @@ -29,8 +30,12 @@ const TipsMenu = ({ return; } + const handleClick = () => { + trackClickEvent("채팅방", text); + }; + return ( - +
{text}

{text}

From 9bb58bf21f522ecabead1bfd624f2ddd6d562c6b Mon Sep 17 00:00:00 2001 From: junjeong Date: Thu, 24 Apr 2025 17:08:36 +0900 Subject: [PATCH 06/15] =?UTF-8?q?=ED=99=88=20=ED=99=94=EB=A9=B4=20?= =?UTF-8?q?=EB=A1=9C=EA=B7=B8=EC=9D=B8=20=EB=B2=84=ED=8A=BC=20click=20?= =?UTF-8?q?=EC=9D=B4=EB=B2=A4=ED=8A=B8=20=ED=95=A0=EB=8B=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/button/LoginButton.tsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/components/button/LoginButton.tsx b/src/components/button/LoginButton.tsx index 40e5162..7ff57c8 100644 --- a/src/components/button/LoginButton.tsx +++ b/src/components/button/LoginButton.tsx @@ -1,8 +1,14 @@ +import trackClickEvent from "@/utils/trackClickEvent"; + const LoginButton = () => { + const handleClick = () => { + trackClickEvent("홈", "로그인 버튼"); + }; + return ( - - ); From 269cc355242e97cbf1066552aecd33b33ef2861c Mon Sep 17 00:00:00 2001 From: junjeong Date: Thu, 24 Apr 2025 17:09:28 +0900 Subject: [PATCH 07/15] =?UTF-8?q?=ED=99=88=20=ED=99=94=EB=A9=B4,=20?= =?UTF-8?q?=EB=82=B4=20=EC=A0=95=EB=B3=B4=20=EB=B2=84=ED=8A=BC=20click=20?= =?UTF-8?q?=EC=9D=B4=EB=B2=A4=ED=8A=B8=20=ED=95=A0=EB=8B=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/header/MainHeader.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/header/MainHeader.tsx b/src/components/header/MainHeader.tsx index 56422df..c5711db 100644 --- a/src/components/header/MainHeader.tsx +++ b/src/components/header/MainHeader.tsx @@ -1,10 +1,12 @@ import { Link, useNavigate } from "react-router-dom"; import LoginButton from "@/components/button/LoginButton"; +import trackClickEvent from "@/utils/trackClickEvent"; const MainHeader = ({ isLoggedIn }: { isLoggedIn: boolean }) => { const navigate = useNavigate(); const handleNavigate = () => { + trackClickEvent("홈", "내 정보 버튼"); navigate("/my-info"); }; From 2dba05c376c635f1c038d1b54d74382386a293b7 Mon Sep 17 00:00:00 2001 From: junjeong Date: Thu, 24 Apr 2025 17:31:22 +0900 Subject: [PATCH 08/15] =?UTF-8?q?feat:=20=ED=99=88=ED=99=94=EB=A9=B4=20?= =?UTF-8?q?=EC=B9=9C=EA=B5=AC=20=EC=B6=94=EA=B0=80,=20=EC=B9=9C=EA=B5=AC?= =?UTF-8?q?=20=EC=82=AD=EC=A0=9C,=20=EB=8C=80=ED=99=94=20=EC=8B=9C?= =?UTF-8?q?=EC=9E=91=ED=95=98=EA=B8=B0=20=EB=B2=84=ED=8A=BC=20click=20?= =?UTF-8?q?=EC=9D=B4=EB=B2=A4=ED=8A=B8=20=ED=95=A0=EB=8B=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Profile.tsx | 3 +++ src/components/SubTitle.tsx | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/components/Profile.tsx b/src/components/Profile.tsx index 0dd39c6..1f20ba6 100644 --- a/src/components/Profile.tsx +++ b/src/components/Profile.tsx @@ -2,6 +2,7 @@ import { SetStateAction } from "react"; import { useNavigate } from "react-router-dom"; import { authInstance } from "@/api/axios"; import { VirtualFriend } from "@/types/virtualFreind"; +import trackClickEvent from "@/utils/trackClickEvent"; interface ProfileProps { info: VirtualFriend; @@ -12,6 +13,7 @@ const Profile = ({ info, deleteIndex, setVirtualFriendList }: ProfileProps) => { const navigate = useNavigate(); const handleDelete = async () => { + trackClickEvent("홈", "친구 - 삭제하기 버튼"); const res = await authInstance.delete( `/api/virtual-friend/${info.virtualFriendId}` ); @@ -23,6 +25,7 @@ const Profile = ({ info, deleteIndex, setVirtualFriendList }: ProfileProps) => { }; const handleNavigate = () => { + trackClickEvent("홈", "친구 - 대화 시작하기 버튼"); navigate("/chat", { state: { mode: "virtualFriend", diff --git a/src/components/SubTitle.tsx b/src/components/SubTitle.tsx index bb165a4..00ed287 100644 --- a/src/components/SubTitle.tsx +++ b/src/components/SubTitle.tsx @@ -1,4 +1,5 @@ import { useNavigate } from "react-router-dom"; +import trackClickEvent from "@/utils/trackClickEvent"; const SubTitle = ({ mode }: { mode: "빠른대화" | "친구목록" }) => { const navigate = useNavigate(); @@ -16,6 +17,7 @@ const SubTitle = ({ mode }: { mode: "빠른대화" | "친구목록" }) => { const handleNavigate = () => { const type = mode === "빠른대화" ? "fastFriend" : "virtualFriend"; + trackClickEvent("홈", "친구 추가 버튼"); navigate("/select-info", { state: { type: type } }); }; From 434ffc7ce18116433476a7c3ea72dfe3e29f0624 Mon Sep 17 00:00:00 2001 From: junjeong Date: Thu, 24 Apr 2025 19:03:53 +0900 Subject: [PATCH 09/15] =?UTF-8?q?fix:=20=EB=B0=94=EC=9D=B4=EB=9F=B4=20?= =?UTF-8?q?=EC=BD=98=ED=85=90=EC=B8=A0=20=EC=A7=88=EB=AC=B8=20=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20=EB=A7=A4=EA=B0=9C=EB=B3=80=EC=88=98?= =?UTF-8?q?=EA=B0=92=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/MbtiTestIntro.tsx | 2 +- src/pages/MbtiTestQuestions.tsx | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/pages/MbtiTestIntro.tsx b/src/pages/MbtiTestIntro.tsx index 45a880b..b0855da 100644 --- a/src/pages/MbtiTestIntro.tsx +++ b/src/pages/MbtiTestIntro.tsx @@ -62,7 +62,7 @@ const MbtiTestIntro = () => { type="submit" className="mt-[60px] h-[60px] w-[320px] rounded-lg bg-primary-normal font-bold text-white hover:opacity-80 lg:w-[460px]" onClick={() => - trackClickEvent("Mbti 테스트 첫 화면", "시작하기 버튼") + trackClickEvent("바이럴 콘텐츠 소개", "시작하기 버튼") } > 시작하기 diff --git a/src/pages/MbtiTestQuestions.tsx b/src/pages/MbtiTestQuestions.tsx index cf4bc71..41256aa 100644 --- a/src/pages/MbtiTestQuestions.tsx +++ b/src/pages/MbtiTestQuestions.tsx @@ -19,8 +19,7 @@ const MbtiTestQuestions = () => { const { currentPage } = useMbtiTestState(); useEffect(() => { - const pageName = `MBTI 테스트 진행중 - Step ${currentPage}`; - trackPageView("/mbti-progress", pageName); + trackPageView(`바이럴 콘텐츠 (질문 ${currentPage})`, ""); }, [currentPage]); if (currentPage) { From b20fe560d05c82fb511ffd9136ced8578e1a7555 Mon Sep 17 00:00:00 2001 From: junjeong Date: Thu, 24 Apr 2025 19:05:47 +0900 Subject: [PATCH 10/15] =?UTF-8?q?fix:=20=EB=A1=9C=EA=B7=B8=EC=9D=B8?= =?UTF-8?q?=EB=B2=84=ED=8A=BC,=20=EB=82=B4=EC=A0=95=EB=B3=B4=20=EB=B2=84?= =?UTF-8?q?=ED=8A=BC=20click=20=EC=9D=B4=EB=B2=A4=ED=8A=B8=20=EB=A7=A4?= =?UTF-8?q?=EA=B0=9C=EB=B3=80=EC=88=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/button/LoginButton.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/button/LoginButton.tsx b/src/components/button/LoginButton.tsx index 7ff57c8..2118365 100644 --- a/src/components/button/LoginButton.tsx +++ b/src/components/button/LoginButton.tsx @@ -2,7 +2,7 @@ import trackClickEvent from "@/utils/trackClickEvent"; const LoginButton = () => { const handleClick = () => { - trackClickEvent("홈", "로그인 버튼"); + trackClickEvent("홈", "로그인"); }; return ( From 950832a31855154dfa2143637cf9f2212a93a88d Mon Sep 17 00:00:00 2001 From: junjeong Date: Thu, 24 Apr 2025 19:06:54 +0900 Subject: [PATCH 11/15] =?UTF-8?q?fix:=20=EC=B9=9C=EA=B5=AC=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80,=20=EC=B9=9C=EA=B5=AC=20=EC=82=AD=EC=A0=9C=20?= =?UTF-8?q?=EB=A7=A4=EA=B0=9C=EB=B3=80=EC=88=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Profile.tsx | 2 +- src/components/SubTitle.tsx | 2 +- src/components/header/MainHeader.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/Profile.tsx b/src/components/Profile.tsx index 1f20ba6..fb01d72 100644 --- a/src/components/Profile.tsx +++ b/src/components/Profile.tsx @@ -13,7 +13,7 @@ const Profile = ({ info, deleteIndex, setVirtualFriendList }: ProfileProps) => { const navigate = useNavigate(); const handleDelete = async () => { - trackClickEvent("홈", "친구 - 삭제하기 버튼"); + trackClickEvent("홈", "친구 - 삭제"); const res = await authInstance.delete( `/api/virtual-friend/${info.virtualFriendId}` ); diff --git a/src/components/SubTitle.tsx b/src/components/SubTitle.tsx index 00ed287..d06f8c8 100644 --- a/src/components/SubTitle.tsx +++ b/src/components/SubTitle.tsx @@ -17,7 +17,7 @@ const SubTitle = ({ mode }: { mode: "빠른대화" | "친구목록" }) => { const handleNavigate = () => { const type = mode === "빠른대화" ? "fastFriend" : "virtualFriend"; - trackClickEvent("홈", "친구 추가 버튼"); + trackClickEvent("홈", "친구 - 추가"); navigate("/select-info", { state: { type: type } }); }; diff --git a/src/components/header/MainHeader.tsx b/src/components/header/MainHeader.tsx index c5711db..8e734f0 100644 --- a/src/components/header/MainHeader.tsx +++ b/src/components/header/MainHeader.tsx @@ -6,7 +6,7 @@ const MainHeader = ({ isLoggedIn }: { isLoggedIn: boolean }) => { const navigate = useNavigate(); const handleNavigate = () => { - trackClickEvent("홈", "내 정보 버튼"); + trackClickEvent("홈", "내정보"); navigate("/my-info"); }; From 17307345b498f3e81ac94ac4d466b711d7a249b6 Mon Sep 17 00:00:00 2001 From: junjeong Date: Thu, 24 Apr 2025 19:17:00 +0900 Subject: [PATCH 12/15] =?UTF-8?q?fix:=20=EB=B0=94=EC=9D=B4=EB=9F=B4=20?= =?UTF-8?q?=EC=BD=98=ED=85=90=EC=B8=A0=20=EA=B2=B0=EA=B3=BC=20=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20view,=20click=20=EC=9D=B4=EB=B2=A4?= =?UTF-8?q?=ED=8A=B8=20=EB=A7=A4=EA=B0=9C=EB=B3=80=EC=88=98=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/button/ChatStartButton.tsx | 10 +++++++--- src/components/button/KakaoLoginButton.tsx | 2 +- src/pages/MbtiTestIntro.tsx | 4 +--- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/components/button/ChatStartButton.tsx b/src/components/button/ChatStartButton.tsx index 556c660..a907dd6 100644 --- a/src/components/button/ChatStartButton.tsx +++ b/src/components/button/ChatStartButton.tsx @@ -1,4 +1,4 @@ -import { useNavigate } from "react-router-dom"; +import { useLocation, useNavigate } from "react-router-dom"; import { trackEvent } from "@/libs/analytics"; type ChatStartButtonProps = { @@ -8,13 +8,17 @@ type ChatStartButtonProps = { const ChatStartButton = ({ mode, mbti }: ChatStartButtonProps) => { const navigate = useNavigate(); + const pathname = useLocation().pathname; const handleNavigate = () => { switch (mode) { case "go-fast": trackEvent("Click", { - page: "홈", - element: "빠른 대화 시작" + page: pathname === "/mbti-test-result" ? "바이럴 콘텐츠 결과" : "홈", + element: + pathname === "/mbti-test-result" + ? "대화 시작하기" + : "빠른 대화 시작" }); navigate("/select-info", { state: { type: "fastFriend", mbti } }); break; diff --git a/src/components/button/KakaoLoginButton.tsx b/src/components/button/KakaoLoginButton.tsx index b238f39..a84b9ba 100644 --- a/src/components/button/KakaoLoginButton.tsx +++ b/src/components/button/KakaoLoginButton.tsx @@ -10,7 +10,7 @@ const KakaoLoginButton = () => { const kakaoURL = `https://kauth.kakao.com/oauth/authorize?client_id=${kakaoRestApiKey}&redirect_uri=${kakaoRedirectUrl}&response_type=code`; const handleClick = () => { - trackClickEvent("로그인/회원가입", "카카오 로그인 버튼"); + trackClickEvent("로그인/회원가입", "로그인"); window.location.href = kakaoURL; }; diff --git a/src/pages/MbtiTestIntro.tsx b/src/pages/MbtiTestIntro.tsx index b0855da..b167903 100644 --- a/src/pages/MbtiTestIntro.tsx +++ b/src/pages/MbtiTestIntro.tsx @@ -61,9 +61,7 @@ const MbtiTestIntro = () => { From 0f7c186989ed8e140577ed423a411daa1709fcaa Mon Sep 17 00:00:00 2001 From: junjeong Date: Thu, 24 Apr 2025 19:19:37 +0900 Subject: [PATCH 13/15] =?UTF-8?q?fix:=20=EB=8D=B0=EC=9D=B4=ED=84=B0=20?= =?UTF-8?q?=ED=83=9C=EA=B9=85=20=EA=B8=B0=ED=9A=8D=EC=97=90=20=EB=A7=9E?= =?UTF-8?q?=EA=B2=8C=20page=20element=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/tips/TipsMenu.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/tips/TipsMenu.tsx b/src/components/tips/TipsMenu.tsx index f1bc95c..5a3bc25 100644 --- a/src/components/tips/TipsMenu.tsx +++ b/src/components/tips/TipsMenu.tsx @@ -7,22 +7,26 @@ const TipsMenu = ({ mode: "topic" | "conversation" | "temporature"; }) => { let text = ""; + let tagElement = ""; let imageUrl = ""; let href = ""; switch (mode) { case "topic": text = "대화 주제 추천"; + tagElement = "대화 주제 추천"; imageUrl = "/icon/starbubble.svg"; href = "/chat-recommend"; break; case "conversation": text = "대화 꿀팁"; + tagElement = "대화 꿀팁"; imageUrl = "/icon/lightbulb.svg"; href = "/chat-tips"; break; case "temporature": text = "현재 대화의 온도 측정하기"; + tagElement = "대화의 온도"; imageUrl = "/icon/thermometer.svg"; href = "/chat-temporature"; break; @@ -31,7 +35,7 @@ const TipsMenu = ({ } const handleClick = () => { - trackClickEvent("채팅방", text); + trackClickEvent("채팅방", tagElement); }; return ( From de086e4a2394fa40e2cde6e8ff492854ac3a3156 Mon Sep 17 00:00:00 2001 From: junjeong Date: Sun, 27 Apr 2025 17:20:57 +0900 Subject: [PATCH 14/15] =?UTF-8?q?fix:=20=EB=8D=B0=EC=9D=B4=ED=84=B0=20?= =?UTF-8?q?=ED=83=9C=EA=B9=85=EA=B8=B0=ED=9A=8D=EA=B3=BC=20=EB=A7=9E?= =?UTF-8?q?=EC=A7=80=20=EC=95=8A=EC=9D=80=20element=20=EB=93=A4=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/button/RestartButton.tsx | 2 -- src/components/button/ShareButton.tsx | 2 -- src/pages/MbtiTestResult.tsx | 1 - 3 files changed, 5 deletions(-) diff --git a/src/components/button/RestartButton.tsx b/src/components/button/RestartButton.tsx index 3c793eb..0f6dae5 100644 --- a/src/components/button/RestartButton.tsx +++ b/src/components/button/RestartButton.tsx @@ -1,11 +1,9 @@ import { useNavigate } from "react-router-dom"; -import trackClickEvent from "@/utils/trackClickEvent"; const RestartButton = () => { const navigate = useNavigate(); const goFirstStep = () => { - trackClickEvent("/MBTI 테스트 결과", "돌아가기 버튼"); navigate("/mbti-test"); }; diff --git a/src/components/button/ShareButton.tsx b/src/components/button/ShareButton.tsx index 7d8425d..8d31be6 100644 --- a/src/components/button/ShareButton.tsx +++ b/src/components/button/ShareButton.tsx @@ -1,13 +1,11 @@ import { useState } from "react"; import ShareModal from "@/components/modal/ShareModal"; -import trackClickEvent from "@/utils/trackClickEvent"; const ShareButton = () => { const [shareModalIsOpen, setShareModalIsOpen] = useState(false); const handleClick = () => { setShareModalIsOpen(true); - trackClickEvent("MBTI 테스트 결과", "공유하기 버튼"); }; return ( <> diff --git a/src/pages/MbtiTestResult.tsx b/src/pages/MbtiTestResult.tsx index 3d2190e..f8a00e1 100644 --- a/src/pages/MbtiTestResult.tsx +++ b/src/pages/MbtiTestResult.tsx @@ -1,4 +1,3 @@ -import { MouseEvent } from "react"; import { MBTI_RESULT_INFO } from "@/constants/MBTI_RESULT_INFO"; import ShareButton from "@/components/button/ShareButton"; import RestartButton from "@/components/button/RestartButton"; From 1b317cf87370838581069453bd2c5d2c888a50e4 Mon Sep 17 00:00:00 2001 From: junjeong Date: Sun, 27 Apr 2025 17:22:11 +0900 Subject: [PATCH 15/15] =?UTF-8?q?chore:=20=EB=B0=94=EB=A1=9C=20=EB=8C=80?= =?UTF-8?q?=ED=99=94=ED=95=98=EA=B8=B0=20=EB=B2=84=ED=8A=BC=20->=20?= =?UTF-8?q?=EB=B0=94=EB=A1=9C=20=EB=8C=80=ED=99=94=ED=95=98=EA=B8=B0=20?= =?UTF-8?q?=EC=98=A4=ED=83=80=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Profile.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Profile.tsx b/src/components/Profile.tsx index fb01d72..d69370c 100644 --- a/src/components/Profile.tsx +++ b/src/components/Profile.tsx @@ -25,7 +25,7 @@ const Profile = ({ info, deleteIndex, setVirtualFriendList }: ProfileProps) => { }; const handleNavigate = () => { - trackClickEvent("홈", "친구 - 대화 시작하기 버튼"); + trackClickEvent("홈", "친구 - 바로 대화하기"); navigate("/chat", { state: { mode: "virtualFriend",