ai-referral-analysis
How to track and measure traffic from ChatGPT, Claude, Perplexity, and Gemini in GA4. Exact dimension filters, regex patterns,…
Query custom dimensions and event parameters in the GA4 Data API. How to find parameter names, register them in GA4 Admin, and query custom event schemas.
Claude Code
$ npx -y skills add surendranb/google-analytics-mcp --skill custom-dimensions --agent claude-code
Codex
$ npx skills add surendranb/google-analytics-mcp --skill custom-dimensions -a codex -y
Cursor
$ npx skills add surendranb/google-analytics-mcp --skill custom-dimensions -a cursor -y
Gemini CLI
$ npx skills add surendranb/google-analytics-mcp --skill custom-dimensions -a gemini-cli -y
GitHub Copilot
$ npx skills add surendranb/google-analytics-mcp --skill custom-dimensions -a github-copilot -y
OpenCode
$ npx skills add surendranb/google-analytics-mcp --skill custom-dimensions -a opencode -y
Windsurf
$ npx skills add surendranb/google-analytics-mcp --skill custom-dimensions -a windsurf -y
name: custom-dimensions titleTag: "GA4 Custom Dimensions & Event Parameters Guide" description: "Query custom dimensions and event parameters in the GA4 Data API. How to find parameter names, register them in GA4 Admin, and query custom event schemas."
How to identify, register, and query custom dimensions and event parameters using the Google Analytics 4 Data API.
Custom dimensions and user properties are unique to your individual website or application. Never guess their names. Always instruct your AI agent to call `search_schema("custom")` first to retrieve the active custom definitions for your specific property.
---
When an event parameter is registered inside Google Analytics (**Admin → Data display → Custom definitions**), it becomes an official dimension in your schema.
If a parameter is actively collected by your tracking code (`gtag.js`, GTM) but has not yet been registered in the GA4 Admin UI, you can query it directly using prefix syntax:
> ⚠️ **Note:** The parameter name following the colon must match the exact case-sensitive string sent by your front-end tracking code.
---
| Parameter Scope | Syntax | Common Use Cases | |---|---|---| | **Event Scope** | `customEvent:<param>` | Page category, button ID, search filter, video title | | **User Scope** | `customUser:<property>` | Account tier, signup cohort, customer lifetime segment | | **Session Scope** | Registered name only | Session-level calculated groups (requires Admin registration) |
---
1. Prompt your agent: `search_schema("custom")`. 2. If your target dimension appears, use its declared API identifier. 3. If it does not appear, verify the parameter name in your Google Tag Manager container or tracking script and query using `customEvent:<param_name>`. 4. If the query returns a 400 error, verify that the parameter has collected at least one event in the queried date range.
Model Context Protocol (MCP) server for Google Analytics 4: real-time query exploration, schema discovery, metric aggregation, and audience insights for AI agents. 🌐 Live Documentation & Web Portal:
How to track and measure traffic from ChatGPT, Claude, Perplexity, and Gemini in GA4. Exact dimension filters, regex patterns,…
Why session, user, and event metrics never match in GA4. Rules for pairing dimensions and metrics across user-scoped,…
Detect and filter automated bot spikes in Google Analytics 4. Patterns for datacenter ASN spikes, zero-second sessions, and…
How GA4 Default Channel Groups work, how to audit channel performance, and how to spot traffic falling into Unassigned or Direct…
Exact API field names for GA4 Data API queries. Avoid 400 errors from Universal Analytics names like ga:sessions or pageviews by…
Which dimensions and metrics can be queried together in GA4 without triggering incompatible scope errors. Matrix of user,…
Use this skill when the user requests to review, analyze, critique, or summarize academic papers, research articles, preprints,…
Research what people actually say about any topic in the last 30 days. Pulls posts and engagement from Reddit, X, YouTube,…
Estimates intracellular metabolic fluxes from steady-state carbon-13 isotope-tracing measurements using validated atom maps,…
Search literature across sources, verify or manage citations, and build MeSH strategies or citation-impact audits. Use for…