npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

gtm-autotag-mcp

v2.0.0

Published

GTM AutoTag MCP - Claude Code에서 GTM 태그 설치/디버깅/배포를 자동화하는 MCP 서버

Readme

GTM AutoTag MCP

AI 에이전트(Claude Code, Cursor 등)에서 Google Tag Manager 태그 설치/분석/검증을 자동화하는 MCP 서버.

사이트 분석부터 태그 생성, 검증까지 전 과정을 자연어로 수행할 수 있습니다.

Quick Start

1. Claude Code

claude mcp add gtm-autotag -- npx gtm-autotag-mcp

2. Cursor / VS Code

프로젝트 .mcp.json 추가:

{
  "mcpServers": {
    "gtm-autotag": {
      "command": "npx",
      "args": ["gtm-autotag-mcp"]
    }
  }
}

3. 첫 실행 - Google 로그인

첫 실행 시 list_accounts 도구를 호출하면 브라우저가 열리며 Google 로그인을 요청합니다. 로그인 후 토큰이 ~/.gtm-autotag/token.json에 저장되어 이후 자동 갱신됩니다.

Playwright 브라우저가 필요합니다: npx playwright install chromium

제공 도구 (17개)

탐색

| 도구 | 설명 | |------|------| | list_accounts | GTM 계정/컨테이너/워크스페이스 목록 | | scan_container | 컨테이너 태그/트리거/변수 압축 목록 | | get_tag_detail | 태그 상세 (Custom HTML 본문 포함) | | scan_page | 페이지 dataLayer + 인터랙티브 요소 분석 |

사이트 분석

| 도구 | 설명 | |------|------| | classify_page | 단일 페이지 유형 자동 분류 (상품상세/장바구니/결제 등) | | analyze_site_taxonomy | 사이트 크롤링 → 페이지 유형 맵 + 퍼널 + 갭 분석 | | detect_datalayer_schema | 여러 페이지 dataLayer 스키마 자동 추론 |

사양 생성

| 도구 | 설명 | |------|------| | generate_tracking_spec | 택소노미 → GA4/Meta/Kakao 추적 사양 자동 생성 | | validate_ecommerce | GA4 Enhanced Ecommerce 데이터 스키마 검증 |

실행

| 도구 | 설명 | |------|------| | create_tracking | 태그/트리거/변수 생성 (clone/new/update 3모드 + 자동 롤백) | | publish_version | 워크스페이스 → 버전 생성 + 게시 | | compare_versions | 두 버전 간 변경사항 비교 |

검증

| 도구 | 설명 | |------|------| | verify_tags | GTM 미리보기 + 액션 수행 + Tag Assistant 결과 확인 | | bulk_verify | 다중 페이지 x 다중 이벤트 검증 매트릭스 | | start_preview | GTM 미리보기 모드 시작 | | check_results | Tag Assistant 결과 확인 |

유틸리티

| 도구 | 설명 | |------|------| | close_browser | Playwright 브라우저 종료 |

워크플로우 예시

"이 사이트 분석해줘"

analyze_site_taxonomy → 사이트 구조 + 페이지 유형 + 추적 갭 분석

"태그 설치해줘"

1. list_accounts → 계정/컨테이너 확인
2. analyze_site_taxonomy → 사이트 구조 분석
3. detect_datalayer_schema → 기존 dataLayer 분석
4. generate_tracking_spec → 추적 사양 자동 생성
5. create_tracking → 태그/트리거/변수 생성
6. bulk_verify → 다중 페이지 검증

"기존 태그 검증해줘"

bulk_verify → 페이지별 이벤트 pass/fail 매트릭스
validate_ecommerce → GA4 EEC 데이터 정확성 검증

인증 설정

기본 (설정 불필요)

내장 OAuth 클라이언트를 사용하여 별도 설정 없이 Google 로그인만으로 사용 가능합니다.

자체 OAuth 앱 사용 (선택)

Google Cloud Console에서 OAuth 클라이언트를 생성한 경우:

방법 A: 환경변수

{
  "mcpServers": {
    "gtm-autotag": {
      "command": "npx",
      "args": ["gtm-autotag-mcp"],
      "env": {
        "GTM_AUTOTAG_CLIENT_ID": "your-client-id",
        "GTM_AUTOTAG_CLIENT_SECRET": "your-client-secret"
      }
    }
  }
}

방법 B: credentials.json

mkdir -p ~/.gtm-autotag
cp your-credentials.json ~/.gtm-autotag/credentials.json

지원 태그 타입

빌더 내장: gaawe (GA4 이벤트), gaawc (GA4 Config), googtag (Google Tag), html (Custom HTML), awct (Google Ads 전환), awrmk (Google Ads 리마케팅)

그 외 타입은 parametersJson으로 GTM API 원본 파라미터 직접 전달 가능.

요구 사항

  • Node.js >= 18
  • Chromium (npx playwright install chromium)
  • GTM 편집 권한이 있는 Google 계정

개발

git clone https://github.com/madup-dct/FuncMVP.git
cd FuncMVP/gtm/gtm-autotag-mcp
npm install
npm run build
npm run dev    # TypeScript watch 모드

License

MIT