Skip to content

Commit 0326ab3

Browse files
committed
chore: Google Analytics 배포 버전에 적용하기
1 parent 51eebe1 commit 0326ab3

File tree

2 files changed

+45
-20
lines changed

2 files changed

+45
-20
lines changed

index.html

Lines changed: 41 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,43 @@
11
<!DOCTYPE html>
22
<html lang="en">
3-
<head>
4-
<meta charset="UTF-8" />
5-
<link rel="icon" type="image/svg+xml" href="/assets/MainLogo.svg" />
6-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7-
<title>같이가요</title>
8-
</head>
9-
<body>
10-
<div id="root"></div>
11-
<script type="module" src="/src/main.tsx"></script>
12-
<script
13-
type="text/javascript"
14-
src="//dapi.kakao.com/v2/maps/sdk.js?appkey=%VITE_KAKAO_MAP_API_KEY%&libraries=services,clusterer&autoload=true"
15-
></script>
16-
<script src="https://developers.kakao.com/sdk/js/kakao.js"></script>
17-
</body>
18-
</html>
3+
4+
<head>
5+
<meta charset="UTF-8" />
6+
<link rel="icon" type="image/svg+xml" href="/assets/MainLogo.svg" />
7+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
8+
9+
<!-- Google Tag Manager -->
10+
<script>
11+
(function (w, d, s, l, i) {
12+
w[l] = w[l] || []; w[l].push({ 'gtm.start': new Date().getTime(), event: 'gtm.js' });
13+
var f = d.getElementsByTagName(s)[0], j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : '';
14+
j.async = true;
15+
j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore(j, f);
16+
})(window, document, 'script', 'dataLayer', 'GTM-MR6M73KS');
17+
</script>
18+
<!-- End Google Tag Manager -->
19+
20+
<title>같이가요</title>
21+
</head>
22+
23+
<body>
24+
<div id="root"></div>
25+
<script type="module" src="/src/main.tsx"></script>
26+
<script type="text/javascript"
27+
src="//dapi.kakao.com/v2/maps/sdk.js?appkey=%VITE_KAKAO_MAP_API_KEY%&libraries=services,clusterer&autoload=true"></script>
28+
<script src="https://developers.kakao.com/sdk/js/kakao.js"></script>
29+
30+
<!-- Google Tag Manager (noscript) -->
31+
<noscript>
32+
<iframe
33+
src="https://www.googletagmanager.com/ns.html?id=GTM-MR6M73KS"
34+
height="0"
35+
width="0"
36+
style="display:none;visibility:hidden"
37+
></iframe>
38+
</noscript>
39+
<!-- End Google Tag Manager (noscript) -->
40+
41+
</body>
42+
43+
</html>

src/features/join/hooks/useUserHook.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ export const useSendCertificationCode = () => {
3838
alert('인증번호를 발송했습니다.');
3939
},
4040
onError: (error: AxiosError<any>) => {
41-
if (error.result) {
42-
const allMessages = Object.values(error.result).join('\n');
41+
if (error.response?.data) {
42+
const allMessages = Object.values(error.response.data.result).join('\n');
4343
alert(allMessages);
4444
} else {
4545
alert(error.message || '인증번호 발송에 실패하였습니다.');
@@ -57,8 +57,8 @@ export const useVerifyCertificationCode = () => {
5757
alert('인증에 성공했습니다.');
5858
},
5959
onError: (error: AxiosError<any>) => {
60-
if (error.result) {
61-
const allMessages = Object.values(error.result).join('\n');
60+
if (error.response?.data) {
61+
const allMessages = Object.values(error.response.data.result).join('\n');
6262
alert(allMessages);
6363
} else {
6464
alert(error.message || '인증에 실패하였습니다.');

0 commit comments

Comments
 (0)