# AI Tag Debugger [Health: Active]

**Category:** 🎯 Marketing  
**Repository:** https://github.com/analitikisler/ai-tag-debugger  
**GitHub Stars:** 1  
**npm Downloads (last month):** 2656  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/analitikisler-ai-tag-debugger

## Description
Open-source AI agent that QA-tests your website's analytics, ad and consent tracking (GA4, GTM, Google Ads, Meta, TikTok). Bring your own model (Claude, OpenAI, Gemini) or use it from your chat app over MCP.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "ai-tag-debugger": {
    "command": "npx",
    "args": ["-y","@analitikisler/ai-tag-debugger"]
  }
}
```

## Documentation

## What AI Tag Debugger MCP server does

AI Tag Debugger MCP server audits website tracking by replaying user journeys such as browsing a product, adding it to a cart, submitting a lead form, or completing checkout. The browser records tracking requests and dataLayer pushes as the journey runs. Findings are compared with a measurement plan and Consent Mode expectations, then assembled into a human-readable report.

Checks include missing events or parameters, invalid purchase values and currencies, empty purchase items, duplicate hits, cross-platform purchase mismatches, unplanned events, exposed personal data, and missing campaign parameters. Consent checks cover premature advertising requests, missing or late Consent Mode signals, cookies set before consent, and tags that remain active after rejection. Server-side tracking details and event-ID mismatches are also checked where the captured requests provide the relevant evidence.

Supported tracking includes GA4, Google Ads, Meta, TikTok, X, LinkedIn, Microsoft Advertising, Criteo, Pinterest, Snapchat, Klaviyo, Adobe Analytics, Matomo, and Piwik PRO events. Microsoft Clarity and Hotjar loads are identified with their project or site IDs.

## How it works

The model receives a goal and a text representation of the page, then acts through browser operations such as navigation, clicking, filling, selection, scrolling, and waiting. Playwright performs those operations one at a time. The `browser_action` and `finish` tools support this interaction.

During browsing, requests to supported collection endpoints are parsed into normalized hits and associated with the journey step that caused them. DataLayer activity, including consent commands, is captured through an initialization script. Collection requests are answered locally by default so test hits do not reach the corresponding real platform accounts. Host-recognized loads such as Clarity and Hotjar can still leave the browser.

Deterministic rules perform the measurement checks without model calls, which makes the results reproducible. The model then explains the findings and suggested corrections. Consent scenarios can open the starting page with accept-all, reject-all, and analytics-only choices in fresh browsers when the consent platform is supported.

## Setup and configuration

The AI Tag Debugger MCP server can be used from a terminal or CI pipeline with an API key for Anthropic, OpenAI, Google Gemini, an OpenAI-compatible provider, or a local Ollama deployment. It can also be used through an MCP-capable chat application, where that application's model performs the audit instead of a separately configured API provider.

Platform selection is optional. By default, GA4, Google Ads, Meta, TikTok, and platforms detected on the site are checked. A fixed provider list can be supplied through the audit configuration or MCP `start_audit` and `run_audit` tools. Consent scenarios can be disabled with `"consent_scenarios": false`.

A `gtm_container` export adds GTM tag and trigger diagnostics, including paused tags, failed conditions, exception triggers, and denied consent. Click, form, visibility, and timer triggers are only evaluated when their corresponding GTM event reaches the captured dataLayer.

## Tools and capabilities

- Start or run audits through the MCP `start_audit` and `run_audit` tools.
- Drive journeys with browser navigation, clicks, form filling, selection, scrolling, and waits.
- Capture tracking hits, dataLayer pushes, consent commands, and journey steps.
- Compare observed behavior with measurement plans and selected platforms.
- Produce reports with findings, platform coverage, consent results, and skipped out-of-scope request counts.
- Explain results in English or Turkish.

## Limitations and notes

The tool cannot observe events that a GA4 server container forwards from another host when those events never pass through the browser; the report marks this limitation. Analytics-only consent testing is supported for OneTrust and Cookiebot, but not for every consent platform. Consent scenarios are skipped when no answerable banner is present or when a saved site is replayed.

Platform-specific checks depend on captured browser requests. Requests to platforms excluded from a fixed selection are answered locally, omitted from the timeline and checks, and reported only as counts. The project is MIT licensed.

_Full upstream README: https://allmcps.com/mcp/analitikisler-ai-tag-debugger/readme_

