ai-referral-analysis
Measure traffic arriving from AI tools — ChatGPT, Claude, Perplexity, Gemini, Copilot, and others — and understand how it behaves…
GA4 enforces strict rules about which dimensions and metrics can appear in the same request. Incompatible combinations return a 400 error: \"The request's dimensions & metrics are incompatible.\"
$ npx -y skills add surendranb/google-analytics-mcp --skill compatible-combinations --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/compatible-combinationsContext preview
The summary Claude sees to decide when to auto-load this skill.
GA4 enforces strict rules about which dimensions and metrics can appear in the same request. Incompatible combinations return a 400 error: \"The request's dimensions & metrics are incompatible.\"
name: compatible-combinations description: "GA4 enforces strict rules about which dimensions and metrics can appear in the same request. Incompatible combinations return a 400 error: \"The request's dimensions & metrics are incompatible.\""
GA4 enforces strict rules about which dimensions and metrics can appear in the same request. Incompatible combinations return a 400 error: "The request's dimensions & metrics are incompatible."
GA4 data is scoped at three levels: **event**, **session**, and **user**. Mixing dimensions and metrics from incompatible scopes causes errors.
| Scope | Example dimensions | Example metrics | |---|---|---| | Event | `eventName`, `customEvent:*` | `eventCount` | | Session | `sessionDefaultChannelGroup`, `sessionSource`, `sessionCampaignName` | `sessions`, `bounceRate`, `sessionKeyEventRate` | | User | `firstUserDefaultChannelGroup`, `firstUserSource` | `totalUsers`, `newUsers` |
| Dimension | Incompatible metric | Use instead | |---|---|---| | `sessionSource` / `sessionMedium` / `sessionCampaignName` | `eventCount` | `sessions` | | `eventName` | `sessions` | `eventCount` | | `promotionId` / `promotionName` | most session/user metrics | only pair with `promotionViews`, `promotionClicks` | | `itemId` / `itemName` | `sessions`, `totalUsers` | `itemsViewed`, `addToCarts`, `ecommercePurchases` | | `firstUserSource` / `firstUserMedium` | `sessions` | `totalUsers`, `newUsers` |
The GA4 error message names the exact field to remove: `"Please remove eventCount to make the request compatible for example."`
Read the message literally — remove that field and replace it with a scope-compatible equivalent.
Ecommerce metrics (`ecommercePurchases`, `purchaseRevenue`, `addToCarts`, `itemsViewed`) are event-scoped. Pair them with event-scoped or `date`/`deviceCategory`/geo dimensions — not with session campaign dimensions.
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:
Measure traffic arriving from AI tools — ChatGPT, Claude, Perplexity, Gemini, Copilot, and others — and understand how it behaves…
GA4 has three distinct attribution scopes. Using the wrong scope gives misleading results. Choose based on the question you are…
Identify and exclude bot, scraper, and spam sessions from GA4 data.
Break down sessions and users by traffic source, medium, and channel group to understand where your audience comes from and which…
The correct GA4 Data API names for fields models most often get wrong. Use these before calling `get_ga4_data` — wrong names…
Identify top-performing pages, find underperforming content, and understand engagement patterns across your site.