From a967aa551f07807dab1e6c5d6c9f900cbf588487 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=84=B1=EA=B2=BD?= Date: Thu, 26 Nov 2026 16:12:51 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20Meta=20=ED=94=BD=EC=85=80=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0,=20GA4=20=EC=A0=84=EC=86=A1=20=EC=A3=BC=EC=86=8C=20?= =?UTF-8?q?=EB=B3=B4=ED=98=B8,=20=EA=B0=9C=EC=9D=B8=EC=A0=95=EB=B3=B4?= =?UTF-8?q?=EC=B2=98=EB=A6=AC=EB=B0=A9=EC=B9=A8=20=EB=B3=B4=EC=99=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 32 ++-- public/privacy.html | 25 ++- src/App.tsx | 25 +-- src/pages/Dashboard/CompletionContent.tsx | 5 +- src/utils/api.ts | 177 ---------------------- 5 files changed, 38 insertions(+), 226 deletions(-) diff --git a/index.html b/index.html index 02171ec..a71c5eb 100755 --- a/index.html +++ b/index.html @@ -8,10 +8,16 @@ window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); - // 로그인 콜백 주소에 붙어 오는 토큰·인가 코드는 지운 주소로 보낸다 (GA4 '데이터 수정' 설정과 이중 보호) - var gaPageUrl = new URL(window.location.href); - ['access_token', 'refresh_token', 'code'].forEach(function (key) { gaPageUrl.searchParams.delete(key); }); - gtag('config', 'G-KK71C474J2', { page_location: gaPageUrl.toString() }); + // 주소에는 토큰·채널 정보 등이 붙어 올 수 있어, 경로와 광고 유입 값(utm_*, gclid)만 남겨 보낸다 + // (GA4 '데이터 수정' 설정과 이중 보호) + (function () { + var current = new URL(window.location.href); + var safeUrl = new URL(current.origin + current.pathname); + current.searchParams.forEach(function (value, key) { + if (key.indexOf('utm_') === 0 || key === 'gclid') safeUrl.searchParams.append(key, value); + }); + gtag('config', 'G-KK71C474J2', { page_location: safeUrl.toString() }); + })(); @@ -87,20 +93,6 @@ - - -