attribution-scope
GA4 has three distinct attribution scopes. Using the wrong scope gives misleading results. Choose based on the question you are…
Measure traffic arriving from AI tools — ChatGPT, Claude, Perplexity, Gemini, Copilot, and others — and understand how it behaves compared to other channels.
$ npx -y skills add surendranb/google-analytics-mcp --skill ai-referral-analysis --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/ai-referral-analysisContext preview
The summary Claude sees to decide when to auto-load this skill.
Measure traffic arriving from AI tools — ChatGPT, Claude, Perplexity, Gemini, Copilot, and others — and understand how it behaves compared to other channels.
name: ai-referral-analysis description: "Measure traffic arriving from AI tools — ChatGPT, Claude, Perplexity, Gemini, Copilot, and others — and understand how it behaves compared to other channels."
Measure traffic arriving from AI tools — ChatGPT, Claude, Perplexity, Gemini, Copilot, and others — and understand how it behaves compared to other channels.
These domains appear as `sessionSource` in GA4 when users click links from AI tools:
| Tool | Source domains | |---|---| | ChatGPT | `chatgpt.com`, `chat.openai.com` | | Claude | `claude.ai` | | Perplexity | `perplexity.ai` | | Gemini | `gemini.google.com` | | Copilot | `copilot.microsoft.com`, `bing.com` (when AI-driven) | | You.com | `you.com` | | Grok | `grok.x.ai`, `x.com` |
dimensions: ["date", "sessionSource"]
metrics: ["sessions", "newUsers", "userEngagementDuration", "screenPageViews"]
dimension_filter: sessionSource contains "chatgpt.com" OR "perplexity.ai" OR
"claude.ai" OR "gemini.google.com" OR "copilot.microsoft.com"
date_range: last 30–90 daysUse `date` as a dimension to see the growth trend.
Compare AI referral quality against your other top channels:
dimensions: ["sessionDefaultChannelGroup", "sessionSource"]
metrics: ["sessions", "userEngagementDuration", "screenPageViewsPerSession",
"keyEvents", "bounceRate"]
date_range: last 30 daysThen filter the results to AI sources and compare engagement metrics against `Organic Search` and `Direct`.
dimensions: ["sessionSource", "landingPage"] metrics: ["sessions", "userEngagementDuration", "keyEvents"] dimension_filter: sessionSource contains "chatgpt.com" OR "perplexity.ai" OR "claude.ai" date_range: last 30 days order_by: sessions DESC
This shows which content AI tools are citing and sending users to.
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:
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…
GA4 enforces strict rules about which dimensions and metrics can appear in the same request. Incompatible combinations return a…
Identify top-performing pages, find underperforming content, and understand engagement patterns across your site.