ai-referral-analysis
How to track and measure traffic from ChatGPT, Claude, Perplexity, and Gemini in GA4. Exact dimension filters, regex patterns,…
A six-step triage framework to diagnose GA4 traffic drops. Isolate channel shifts, check tracking snippet errors, and distinguish real drops from bot drops.
Claude Code
$ npx -y skills add surendranb/google-analytics-mcp --skill traffic-diagnosis --agent claude-code
Codex
$ npx skills add surendranb/google-analytics-mcp --skill traffic-diagnosis -a codex -y
Cursor
$ npx skills add surendranb/google-analytics-mcp --skill traffic-diagnosis -a cursor -y
Gemini CLI
$ npx skills add surendranb/google-analytics-mcp --skill traffic-diagnosis -a gemini-cli -y
GitHub Copilot
$ npx skills add surendranb/google-analytics-mcp --skill traffic-diagnosis -a github-copilot -y
OpenCode
$ npx skills add surendranb/google-analytics-mcp --skill traffic-diagnosis -a opencode -y
Windsurf
$ npx skills add surendranb/google-analytics-mcp --skill traffic-diagnosis -a windsurf -y
name: traffic-diagnosis titleTag: "Diagnose GA4 Traffic Drops: Step-by-Step Triage Guide" description: "A six-step triage framework to diagnose GA4 traffic drops. Isolate channel shifts, check tracking snippet errors, and distinguish real drops from bot drops."
Systematically diagnose why Google Analytics 4 traffic changed — whether a sudden drop, an unexpected spike, or a gradual erosion in quality. Follow these steps in order to eliminate speculation and isolate the root cause.
Compare the affected timeframe to the equivalent prior period (accounting for day-of-week seasonality):
dimensions: ["date"] metrics: ["sessions", "totalUsers", "newUsers", "engagedSessions", "keyEvents"] date_range: affected period + same-length prior period
Measure absolute change, percentage change, and whether all metrics moved together:
---
Determine which acquisition channel drove the variance:
dimensions: ["sessionDefaultChannelGroup"] metrics: ["sessions", "totalUsers", "engagedSessions", "engagementRate"] date_range: affected period vs prior period
Isolate the channel accounting for the majority of the drop (Organic Search, Paid Search, Direct, Referral, or Social) before investigating deeper.
---
The shape of the decline reveals the underlying mechanism:
dimensions: ["date", "sessionDefaultChannelGroup"] metrics: ["sessions"] date_range: last 28 days
---
See the `bot-traffic-detection` skill. If traffic dropped but `engagementRate` surged from 20% to 65%, your site didn't lose real customers — a spam bot network was filtered out.
dimensions: ["sessionCampaignName", "sessionSource", "sessionMedium"] metrics: ["sessions", "keyEvents", "engagementRate"] dimension_filter: sessionDefaultChannelGroup IN ["Paid Search", "Paid Social", "Display"]
Check whether campaign spend paused, ad group targeting narrowed, or billing expired.
dimensions: ["sessionDefaultChannelGroup", "landingPagePlusQueryString"] metrics: ["sessions", "engagementRate", "keyEvents"] dimension_filter: sessionDefaultChannelGroup = "Organic Search" date_range: 90 days
Cross-check with Google Search Console:
---
Copy-paste these prompts into Claude Code, Cursor, or Gemini CLI:
1. "Diagnose our traffic drop over the last 14 days compared to the prior 14 days. Break down sessions, users, and engagement rate by sessionDefaultChannelGroup and identify the primary driver." 2. "Check daily organic search sessions for the last 30 days alongside landingPage. Was the drop site-wide or isolated to specific landing pages?" 3. "Audit our top 10 landing pages comparing the last 7 days to the prior 7 days. Flag pages with more than a 25% drop in sessions and check if mobile or desktop traffic fell faster."
1. Open **Reports → Acquisition → Traffic acquisition**. 2. Click the date selector in the top-right corner. 3. Turn on **Compare** and select **Preceding period (match day of week)**. 4. Review the percentage change column for `sessionDefaultChannelGroup` to spot the channel with the largest negative delta.
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…