ai-referral-analysis
Measure traffic arriving from AI tools — ChatGPT, Claude, Perplexity, Gemini, Copilot, and others — and understand how it behaves…
Systematically diagnose why traffic changed — spike, drop, or shift in mix. Follow these steps in order. Each step narrows the hypothesis.
$ npx -y skills add surendranb/google-analytics-mcp --skill traffic-diagnosis --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/traffic-diagnosisContext preview
The summary Claude sees to decide when to auto-load this skill.
Systematically diagnose why traffic changed — spike, drop, or shift in mix. Follow these steps in order. Each step narrows the hypothesis.
name: traffic-diagnosis description: "Systematically diagnose why traffic changed — spike, drop, or shift in mix. Follow these steps in order. Each step narrows the hypothesis."
Systematically diagnose why traffic changed — spike, drop, or shift in mix. Follow these steps in order. Each step narrows the hypothesis.
Compare the period in question to the equivalent prior period:
dimensions: ["date"] metrics: ["sessions", "totalUsers", "newUsers", "engagedSessions", "keyEvents"] date_range: affected period + same-length prior period
Measure: absolute change, % change, and whether all metrics moved together. If sessions dropped but engagement rate improved, volume dropped but quality held — different cause than if everything dropped proportionally.
dimensions: ["sessionDefaultChannelGroup"] metrics: ["sessions", "totalUsers", "engagedSessions", "engagementRate"] date_range: affected period vs prior period
Which channel account for most of the change? Narrow to that channel before going deeper.
dimensions: ["date", "sessionDefaultChannelGroup"] metrics: ["sessions"] date_range: last 28 days
Run queries matching the suspected cause:
**Bot flood** — see `bot-traffic-detection` skill:
**Campaign start/end**:
dimensions: ["sessionCampaignName", "sessionSource", "sessionMedium"] metrics: ["sessions", "keyEvents", "engagementRate"] dimension_filter: sessionDefaultChannelGroup IN ["Paid Search", "Paid Social", "Display"]
**SEO change (organic)**:
dimensions: ["sessionDefaultChannelGroup", "landingPagePlusQueryString"] metrics: ["sessions", "engagementRate", "keyEvents"] dimension_filter: sessionDefaultChannelGroup = "Organic Search" date_range: 90 days (to see gradual trend)
**Technical/tracking change** — all channels drop equally at the same moment. Check with `dimensions: ["date"]` — a vertical drop on a single date across all channels points to a tag firing issue or consent mode change.
State: 1. What changed (metric + magnitude) 2. Which channel drove it 3. When it started (sudden or gradual) 4. Most likely cause (from fingerprinting) 5. One action: investigate further / fix tracking / pause campaign / accept as seasonal
Do not conclude "traffic dropped" from a single metric in isolation. Do not compare to the prior week without accounting for day-of-week patterns (Monday always differs from Sunday — compare Monday-to-Monday or full weeks).
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…
GA4 enforces strict rules about which dimensions and metrics can appear in the same request. Incompatible combinations return a…