Skip to main content
Glama
gtm-tag-architect

gtm-tag-architect

gtm-tag-architect

Google Antigravity と Claude Code 向けの公開・本番対応プラグインで、Google Tag Manager に MCP 経由で接続します。

開発者/マーケターにサイトについてインタビューし、コンテナの欠陥(重複、欠落したトリガー、Consent Mode v2 違反)を診断し、最適化されたトラッキングタクソノミーと dataLayer 契約を生成する対話型の /setup コマンドを提供します。


機能

  • /setup 対話型コマンド: 3 段階のインタビューと監査ワークフローをガイドします。

  • 詳細なコンテナ診断: 重複した GA4/Meta タグ、孤立したトリガー、同意のないマーケティングピクセル、レンダリングをブロックするスクリプトを監査します。

  • 自動修復: タグの重複を排除し、すべてのタグに Google Consent Mode v2 を適用します。

  • 業界別トラッキングマトリクス: E-Commerce、SaaS/PLG、B2B Lead Gen 向けの事前構築済みタクソノミーランブック。

  • 開発者向け dataLayer.d.ts ジェネレーター: React、Next.js、vanilla アプリ向けの型付きイベント契約とヘルパー push 関数を生成します。

  • デュアルモード MCP サーバー: Google Tag Manager REST API v2 に対してライブで動作するか、ローカルのエクスポート済みコンテナ JSON ファイルをオフラインで監査します。


Related MCP server: mcp-gtm-ga4

インストールとセットアップ

Google Antigravity 向け

このリポジトリをワークスペースまたはグローバルカスタマイズディレクトリにクローンまたは配置します:

# In your project's .agents/plugins/ or ~/.gemini/config/plugins/
git clone https://github.com/jarnielcataluna/gtm-tag-architect.git

Antigravity はプラグインを自動的に検出し、/setup スラッシュコマンドを公開し、mcp_config.json で定義された MCP サーバーを登録します。

Claude Code / スタンドアロン MCP 向け

claude_desktop_config.json またはプロジェクトの MCP 設定にサーバーを登録します:

{
  "mcpServers": {
    "gtm-tag-architect": {
      "command": "node",
      "args": ["/path/to/gtm-tag-architect/bin/gtm-mcp.js"]
    }
  }
}

使用方法

/setup コマンドを実行

Antigravity または Claude Code 内で:

/setup

エージェントは以下についてインタビューします:

  1. サイトタイプと業界(E-Commerce、SaaS、Lead Gen、Content)

  2. 必要なピクセル(GA4、Meta、LinkedIn、Google Ads、PostHog)

  3. プライバシー要件(GDPR / Consent Mode v2)

その後、診断監査を実行し、欠陥の修正、同意ルールの適用、クリーンな dataLayer.d.ts のエクスポートを行うアクションメニューを提示します。


テストとローカル監査

付属のテストフィクスチャに対してオフライン診断テストハーネスを実行できます:

npm install
npm run audit-fixture

ライセンス

MIT

Available Tools

5 tools
gtm_add_tag_recipeB

Adds a pre-configured tag recipe (GA4 Core, Meta Pixel, PostHog, or LinkedIn) to the container workspace.

Inputs: recipe (required), pixelId, containerPath, measurementId.

gtm_audit_containerA

Runs a deep diagnostic audit on a Google Tag Manager container. Identifies duplicate tags, missing triggers, unconsented tracking (Consent Mode v2), and heavy blocking scripts.

Inputs: containerPath.

gtm_deduplicate_tagsA

Deduplicates GA4 configuration and Meta Pixel tags in the GTM container, consolidating firing triggers and pruning duplicate base tags.

Inputs: containerPath.

gtm_generate_datalayer_typesA

Generates production TypeScript type definitions and helper push functions for developers (E-commerce, SaaS, or Lead Gen).

Inputs: industry (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 5 tools

    Disambiguation4/5

    Each tool targets a distinct action in the GTM workflow—audit, deduplicate, apply consent, add recipe, generate types—so an agent can usually pick the right one. Minor overlap exists where audit surfaces duplicates and consent gaps that deduplicate and apply_consent_mode then fix, but the strong action verbs keep the boundaries clear.

    Naming Consistency5/5

    All tool names follow the identical `gtm_<verb>_<object>` snake_case pattern with perfect consistency. The `gtm_` prefix scopes everything to the domain, and every verb is a single lowercase action word.

    Tool Count5/5

    Five tools is a well-scoped surface for a GTM tag-management assistant. Each tool addresses a distinct stage of the tag lifecycle—audit, cleanup, compliance, templating, and developer handoff—without feature bloat.

    Completeness4/5

    The core architecture workflow is well covered: audit, deduplicate, configure consent, add standard tags, and generate TypeScript datalayer helpers. Publication/preview submission and tag removal are missing, so agents may need workarounds, but the primary setup path is fully covered.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      MCP server for Google Tag Manager and GA4, enabling tag management, consent auditing, workspace versioning, and analytics reporting through natural language.
      11
      56 npm
      3
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server for Google Tag Manager API v2, enabling programmatic management of accounts, containers, workspaces, tags, triggers, variables, and version workflows.
      34 npm
      16
      MIT
    • A
      license
      A
      quality
      F
      maintenance
      An MCP server for the Google Tag Manager API v2 that enables AI assistants to query GTM accounts, containers, tags, triggers, variables, and unpublished changes.
      24
      1
      Apache 2.0