Skip to content

chore: Google Tag Manager(GTM) 도입 및 기존 GA4 태그 제거#49

Merged
kangdy25 merged 1 commit intomainfrom
chore/add-ga4-script
Mar 3, 2026
Merged

chore: Google Tag Manager(GTM) 도입 및 기존 GA4 태그 제거#49
kangdy25 merged 1 commit intomainfrom
chore/add-ga4-script

Conversation

@kangdy25
Copy link
Collaborator

@kangdy25 kangdy25 commented Mar 3, 2026

🚀chore: Google Tag Manager(GTM) 도입 및 기존 GA4 태그 제거

📝 변경사항

  • GoogleTagManager 컴포넌트를 활용하여 'gtag.js' 를-> 'gtm.js' 로 변경

✅ 체크리스트

  • 코드 리뷰를 받았습니다
  • 테스트를 완료했습니다
  • 린터 에러가 없습니다
  • 타입 에러가 없습니다
  • 브라우저에서 테스트를 완료했습니다
  • 모바일에서 테스트를 완료했습니다 (해당되는 경우)

📸 스크린샷

UI 변경 사항이 있다면 이미지를 드래그해서 넣어주세요!

💬 리뷰어 전달사항

  • 리뷰어가 특별히 확인해야 할 사항이 있다면 적어주세요.

Summary by CodeRabbit

  • Chores
    • 분석 추적 서비스가 업데이트되었습니다. 앱의 성능 모니터링 및 사용자 행동 분석을 위해 추적 인프라가 개선되었습니다.

@vercel
Copy link

vercel bot commented Mar 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
mingling-frontend Ready Ready Preview, Comment Mar 3, 2026 0:14am

@coderabbitai
Copy link

coderabbitai bot commented Mar 3, 2026

Walkthrough

Google Analytics를 Google Tag Manager로 마이그레이션하는 변경으로, GoogleTagManager 컴포넌트를 import하여 HTML 루트에 GTM ID와 함께 렌더링하고 GoogleAnalytics 컴포넌트 사용을 제거했습니다.

Changes

Cohort / File(s) Summary
Analytics Migration
app/layout.tsx
Google Analytics를 Google Tag Manager로 교체. GoogleTagManager 컴포넌트를 @next/third-parties/google에서 import하여 추가하고 GoogleAnalytics 컴포넌트 사용 제거.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Suggested reviewers

  • kim3360
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 변경사항의 주요 내용을 명확하게 설명하고 있습니다. Google Tag Manager(GTM) 도입 및 GA4 태그 제거라는 핵심 변경사항을 정확히 반영하고 있습니다.
Description check ✅ Passed PR 설명이 주어진 템플릿 구조를 따르고 있으나, 변경사항 섹션이 제한적이고 리뷰어 전달사항이 미작성되어 있습니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/add-ga4-script

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@kangdy25 kangdy25 requested a review from kim3360 March 3, 2026 12:16
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@app/layout.tsx`:
- Line 9: 현재 app/layout.tsx에서 import 구문에 사용되지 않는 심볼 GoogleAnalytics가 포함되어 있습니다;
import 문에서 GoogleAnalytics를 제거하고 GoogleTagManager만 남기도록 수정하세요 (즉, import {
GoogleTagManager } from '@next/third-parties/google';로 정리), 변경 후 빌드나 lint 에러가
없는지 확인하세요.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 03b8f26 and c0141db.

📒 Files selected for processing (1)
  • app/layout.tsx

import GlobalModal from '@/components/modal/globalModal';
import QueryProvider from '@/components/providers/queryProvider';
import { GoogleAnalytics } from '@next/third-parties/google';
import { GoogleAnalytics, GoogleTagManager } from '@next/third-parties/google';
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

cat -n app/layout.tsx

Repository: SWYP-mingling/Frontend

Length of output: 2555


🏁 Script executed:

rg -n '\bGoogleAnalytics\b' app/layout.tsx

Repository: SWYP-mingling/Frontend

Length of output: 147


사용하지 않는 GoogleAnalytics import를 제거해주세요.

Line 9에서 GoogleAnalytics를 import했지만 파일에서 사용되지 않습니다. GoogleTagManager만 필요하므로 import를 정정하면 됩니다.

-import { GoogleAnalytics, GoogleTagManager } from '@next/third-parties/google';
+import { GoogleTagManager } from '@next/third-parties/google';
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
import { GoogleAnalytics, GoogleTagManager } from '@next/third-parties/google';
import { GoogleTagManager } from '@next/third-parties/google';
🧰 Tools
🪛 GitHub Check: build

[warning] 9-9:
'GoogleAnalytics' is defined but never used

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/layout.tsx` at line 9, 현재 app/layout.tsx에서 import 구문에 사용되지 않는 심볼
GoogleAnalytics가 포함되어 있습니다; import 문에서 GoogleAnalytics를 제거하고 GoogleTagManager만
남기도록 수정하세요 (즉, import { GoogleTagManager } from '@next/third-parties/google';로
정리), 변경 후 빌드나 lint 에러가 없는지 확인하세요.

@kangdy25 kangdy25 merged commit 54781f4 into main Mar 3, 2026
4 checks passed
@kangdy25 kangdy25 deleted the chore/add-ga4-script branch March 3, 2026 21:40
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.

2 participants