gtag 추가
This commit is contained in:
@@ -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 || '결제가 취소되었습니다.';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user