Skip to main content
Glama
gtm-tag-architect

gtm-tag-architect

gtm-tag-architect

Публичный, готовый к продакшену плагин для Google Antigravity и Claude Code, который подключается к Google Tag Manager через MCP.

Он предоставляет интерактивную команду /setup, которая опрашивает разработчиков/маркетологов об их сайте, диагностирует дефекты контейнера (дубликаты, отсутствующие триггеры, нарушения Consent Mode v2) и генерирует оптимизированные таксономии отслеживания и контракты dataLayer.


Возможности

  • Интерактивная команда /setup: Проводит вас через 3-этапный процесс интервью и аудита.

  • Глубокая диагностика контейнера: Аудит дублирующихся тегов GA4/Meta, осиротевших триггеров, маркетинговых пикселей без согласия и скриптов, блокирующих рендеринг.

  • Автоматическое исправление: Дедупликация тегов и применение Google Consent Mode v2 ко всем тегам.

  • Отраслевые матрицы отслеживания: Готовые руководства по таксономии для E-Commerce, SaaS/PLG и B2B Lead Gen.

  • Генератор dataLayer.d.ts для разработчиков: Генерирует типизированные контракты событий и вспомогательные push-функции для React, Next.js и обычных приложений.

  • 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-сервер, определённый в mcp_config.json.

Для 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.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    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
      57 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.
      46 npm
      15
      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
      13 PyPI
      1
      Apache 2.0