Skip to content

chore: GTM 설정 (vue-gtm 설치 & GTM ID 추가)#109

Merged
SoMin-Yoo merged 2 commits intomainfrom
develop
Feb 5, 2026
Merged

chore: GTM 설정 (vue-gtm 설치 & GTM ID 추가)#109
SoMin-Yoo merged 2 commits intomainfrom
develop

Conversation

@utact
Copy link
Collaborator

@utact utact commented Feb 5, 2026

🚀 작업 배경

UX 개선을 위해 운영 중인 서비스에 대한 분석이 필요합니다.


🛠️ 주요 변경 사항

  • 구글 태그 관리자 설정을 추가합니다.

🔗 관련 이슈

생략합니다.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR integrates Google Tag Manager (GTM) into the Vue.js frontend application to enable analytics tracking for UX improvements. The implementation uses the @gtm-support/vue-gtm library to add GTM with automatic page view tracking through Vue Router integration.

Changes:

  • Added @gtm-support/vue-gtm package dependency (version 3.1.0)
  • Configured GTM plugin in the main.js entry point with container ID "GTM-KW2ZZ446"
  • Set up automatic page view tracking by integrating with Vue Router

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
frontend/src/main.js Imported and configured the GTM plugin with router integration for page tracking
frontend/package.json Added @gtm-support/vue-gtm@^3.1.0 dependency
frontend/package-lock.json Updated dependency lock file with GTM packages and their transitive dependencies
Files not reviewed (1)
  • frontend/package-lock.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

app.use(router);
app.use(
createGtm({
id: "GTM-KW2ZZ446",
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The GTM ID is hardcoded, which means the same container will be used across all environments (development, staging, production). This can lead to polluted analytics data with development/testing activity mixed with production data. Consider using environment variables (e.g., VITE_GTM_ID) to allow different GTM containers for different environments. This would enable cleaner analytics separation and better testing isolation.

Suggested change
id: "GTM-KW2ZZ446",
id: import.meta.env.VITE_GTM_ID ?? "GTM-KW2ZZ446",

Copilot uses AI. Check for mistakes.
@SoMin-Yoo SoMin-Yoo merged commit d9ca6bf into main Feb 5, 2026
3 checks passed
@utact
Copy link
Collaborator Author

utact commented Feb 5, 2026

Pollution 이슈는 GitHub App 마이그레이션 할 때 작업하겠습니다.

@utact utact self-assigned this Feb 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants