Skip to main content
Glama
gtm-tag-architect

gtm-tag-architect

gtm-tag-architect

Ein öffentliches, produktionsreifes Plugin für Google Antigravity und Claude Code, das über MCP eine Verbindung zu Google Tag Manager herstellt.

Es bietet einen interaktiven /setup-Befehl, der Entwickler/Marketer zu ihrer Website befragt, Container-Defekte diagnostiziert (Duplikate, fehlende Trigger, Consent-Mode-v2-Verstöße) und optimierte Tracking-Taxonomien sowie dataLayer-Verträge generiert.


Funktionen

  • Interaktiver /setup-Befehl: Führt Sie durch einen dreistufigen Interview- und Audit-Workflow.

  • Umfassende Container-Diagnose: Prüft auf doppelte GA4-/Meta-Tags, verwaiste Trigger, nicht eingewilligte Marketing-Pixel und render-blockierende Skripte.

  • Automatisierte Behebung: Entfernt Duplikate von Tags und setzt Google Consent Mode v2 für alle Tags durch.

  • Branchenspezifische Tracking-Matrizen: Vorgefertigte Taxonomie-Runbooks für E-Commerce, SaaS/PLG und B2B-Lead-Generierung.

  • dataLayer.d.ts-Generator für Entwickler: Generiert typisierte Event-Verträge und Hilfs-Push-Funktionen für React, Next.js und Vanilla-Apps.

  • MCP-Server mit zwei Modi: Läuft live gegen die Google-Tag-Manager-REST-API v2 oder prüft offline lokale exportierte Container-JSON-Dateien.


Related MCP server: mcp-gtm-ga4

Installation & Einrichtung

Für Google Antigravity

Klonen Sie dieses Repository oder platzieren Sie es in Ihrem Arbeitsbereich oder Ihrem globalen Anpassungsverzeichnis:

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

Antigravity erkennt das Plugin automatisch, stellt den /setup-Slash-Befehl bereit und registriert den in mcp_config.json definierten MCP-Server.

Für Claude Code / eigenständiges MCP

Registrieren Sie den Server in Ihrer claude_desktop_config.json oder in den MCP-Einstellungen des Projekts:

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

Verwendung

Führen Sie den /setup-Befehl aus

In Antigravity oder Claude Code:

/setup

Der Agent befragt Sie zu:

  1. Website-Typ & Branche (E-Commerce, SaaS, Lead-Generierung, Content)

  2. Erforderliche Pixel (GA4, Meta, LinkedIn, Google Ads, PostHog)

  3. Datenschutzanforderungen (DSGVO / Consent Mode v2)

Anschließend führt er eine Diagnoseprüfung durch und präsentiert Ihnen ein Aktionsmenü, um Fehler zu beheben, Einwilligungsregeln anzuwenden oder eine saubere dataLayer.d.ts zu exportieren.


Testen & lokale Prüfung

Sie können die Offline-Diagnosetestumgebung gegen die enthaltene Testvorlage ausführen:

npm install
npm run audit-fixture

Lizenz

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
      321 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