Web Analytics & Tracking MCP Server
Enables sending server-side events to Google Analytics 4 via Measurement Protocol, validating event payloads against GA4 e-commerce schemas, and generating gtag.js tracking snippets.
Provides DataLayer schema validation for GTM and generates GTM dataLayer.push tracking code snippets.
Audits tracking event payloads for Meta Conversions API (CAPI), scoring readiness and providing recommendations.
Generates React tracking hooks for integrating analytics events.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Web Analytics & Tracking MCP ServerValidate my dataLayer push for purchase against the GA4 e-commerce schema"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Web Analytics & Tracking MCP Server
A production-ready Model Context Protocol (MCP) server for Google Tag Manager (GTM), Google Analytics 4 (GA4) Measurement Protocol, DataLayer schema validation, Meta CAPI auditing, and tracking code snippet generation.
📌 Features
🎯 DataLayer Schema Validator: Automatically validates GTM
dataLayer.pushobjects against GA4 e-commerce schemas (purchase,add_to_cart,lead, etc.).🚀 GA4 Measurement Protocol Event Transmitter: Transmits server-side events directly to Google Analytics 4 via Measurement Protocol API.
🛠️ Tracking Code Snippet Generator: Generates production-ready code snippets for GTM
window.dataLayer.push, GA4gtag.js, and React tracking hooks.📊 Tracking Quality & EMQ Auditor: Audits tracking event payloads for GA4 and Meta Conversions API (CAPI), scoring readiness from 0-100 and providing recommendations.
📑 Built-in Specification Resource: Exposes static GA4 e-commerce standard schemas as an MCP resource (
ga4://spec/ecommerce).
Related MCP server: google-analytics-mcp
🛠️ Quick Start
1. Prerequisites
Node.js: v18.0.0 or higher
npm: v9.0.0 or higher
2. Installation & Build
# Clone repository
git clone https://github.com/webanalyticsprobd-maker/tracking-mcp-server.git
cd tracking-mcp-server
# Install dependencies
npm install
# Compile TypeScript
npm run build3. Environment Setup (Optional)
Copy .env.example to .env and fill in your GA4 credentials if you plan to send live server-side Measurement Protocol events:
GA4_MEASUREMENT_ID=G-XXXXXXXXXX
GA4_API_SECRET=your_ga4_api_secret_here⚙️ How to Connect to MCP Clients
Cursor IDE Configuration
Add the following snippet to your Cursor MCP Tools settings or .cursor/mcp.json:
{
"mcpServers": {
"tracking-analytics-server": {
"command": "node",
"args": ["C:/path/to/tracking-mcp-server/dist/index.js"],
"env": {
"GA4_MEASUREMENT_ID": "G-XXXXXXXXXX",
"GA4_API_SECRET": "your_api_secret"
}
}
}
}Claude Desktop Configuration
Add the following to your claude_desktop_config.json:
{
"mcpServers": {
"tracking-analytics-server": {
"command": "node",
"args": ["C:/path/to/tracking-mcp-server/dist/index.js"]
}
}
}📄 License
Licensed under the MIT License.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityAmaintenanceProduction-grade MCP server for the Google Tag Manager API v2 with read-only GA4 (Admin + Data API) tooling. 107 tools covering the full GTM surface, including server-side containers. Ships read-only: writes, publishes, and deletes are each gated behind separate opt-in flags, every mutation requires per-call confirmation, and a dry-run mode simulates changes. Includes container auditsLast updated410014,9731MIT
- Alicense-qualityDmaintenanceA powerful Model Context Protocol (MCP) server that provides comprehensive Google Analytics 4 (GA4), Google Search Console (GSC), and Google Merchant Center (GMC) integration for Claude Desktop and other MCP clients.Last updatedApache 2.0
- AlicenseAqualityAmaintenanceMCP server for Google Tag Manager and GA4, enabling tag management, consent auditing, workspace versioning, and analytics reporting through natural language.Last updated18642MIT
- Flicense-qualityBmaintenanceA remote MCP server for Google Tag Manager that enables AI assistants to manage GTM accounts, containers, tags, triggers, variables, and more via OAuth or service account authentication.Last updated1
Related MCP Connectors
Hosted Amazon Seller and Vendor MCP server for Claude, ChatGPT, Cursor, Codex, Gemini, Copilot.
Hosted MCP server for LLM cost estimation, model comparison, and budget-aware routing.
Hosted Amazon Seller Central and Amazon Ads MCP server for Claude, ChatGPT, Cursor, and agents.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/webanalyticsprobd-maker/tracking-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server