gtag 추가

This commit is contained in:
2025-07-03 08:36:26 +09:00
parent 01aa5dfe66
commit 73b6439702
23 changed files with 414 additions and 17 deletions
@@ -16,13 +16,21 @@
<script setup>
import { ref, onMounted } from 'vue';
import { useGtag } from 'vue-gtag-next';
import { useRouter, useRoute } from 'vue-router';
const router = useRouter();
const route = useRoute();
const message = ref('');
// 페이지 진입 시 Google Analytics 페이지뷰 추적
onMounted(async () => {
const gtag = useGtag();
gtag.pageview({
page_title: '결제실패',
page_path: window.location.pathname,
page_location: window.location.href
});
// URL에서 메시지 가져오기
message.value = route.query.message || '결제가 취소되었습니다.';