Conversation
There was a problem hiding this comment.
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-gtmpackage 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", |
There was a problem hiding this comment.
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.
| id: "GTM-KW2ZZ446", | |
| id: import.meta.env.VITE_GTM_ID ?? "GTM-KW2ZZ446", |
|
Pollution 이슈는 GitHub App 마이그레이션 할 때 작업하겠습니다. |
🚀 작업 배경
UX 개선을 위해 운영 중인 서비스에 대한 분석이 필요합니다.
🛠️ 주요 변경 사항
🔗 관련 이슈
생략합니다.