/google-analytics-mcp:bot-traffic-detectionfrom google-analytics-mcp
Detects and filters automated bot spikes in Google Analytics 4 using forensic signals like zero-second sessions, datacenter ASN clustering, and single-page screenPageViews.
Ships in google-analytics-mcp. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Identify and exclude bot, scraper, crawler, and spam sessions from your Google Analytics 4 reporting to protect conversion rates and prevent skewed traffic baselines.
Query sessions exhibiting zero or near-zero engagement duration:
dimensions: ["sessionDefaultChannelGroup", "sessionSource", "sessionMedium"]
metrics: ["sessions", "userEngagementDuration", "bounceRate", "screenPageViewsPerSession"]
date_range: last 7–14 days
Bot indicators: userEngagementDuration < 1.0 second, screenPageViewsPerSession exactly 1.0, and bounceRate at 1.0 (100%).
dimensions: ["sessionSource", "sessionMedium", "sessionDefaultChannelGroup"]
metrics: ["sessions", "userEngagementDuration", "newUsers"]
dimension_filter: sessionMedium = "referral"
Flag and isolate any referral source where userEngagementDuration / sessions is under 2 seconds.
dimensions: ["hostname"]
metrics: ["sessions", "screenPageViews"]
Scrapers and spambots frequently fire Google Analytics measurement tags without actually visiting your domain (hitting raw IP addresses, scraper staging proxies, or ghost hosts). Always verify that hostname matches your legitimate production domains.
dimensions: ["country", "city", "sessionSource"]
metrics: ["sessions", "userEngagementDuration"]
order_by: sessions DESC
Clusters of hundreds of sessions originating from known datacenter hubs (e.g., Boardman, Ashburn, Council Bluffs) with zero engagement indicate automated cloud scraper runs rather than human browsing.
While Google Analytics 4 excludes known IAB-registered bots automatically, headless crawlers and custom scrapers bypass default filters.
To filter suspected bot traffic in API queries, combine dimension and metric filters:
userEngagementDuration equals 0 and screenPageViewsPerSession equals 1.hostname strictly to your verified production domain.Copy-paste these prompts into Claude, Cursor, or Gemini CLI:
1. "Audit our traffic from the last 7 days for bot contamination. Check bounce rate, average session duration, and single-page sessions grouped by sessionSource."
2. "List all sessions grouped by hostname over the past 30 days. Flag any traffic hitting hostnames other than our primary domain."
3. "Show me cities generating more than 100 sessions over the last 14 days where average engagement duration was under 3 seconds."
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub surendranb/google-analytics-mcp --plugin google-analytics-mcp17 skills in this plugin
/ai-referral-analysisHow to track and measure traffic from ChatGPT, Claude, Perplexity, and Gemini in GA4. Exact dimension filters, regex patterns, and channel comparison rules./attribution-scopeWhy session, user, and event metrics never match in GA4. Rules for pairing dimensions and metrics across user-scoped, session-scoped, and event-scoped models./channel-acquisitionHow GA4 Default Channel Groups work, how to audit channel performance, and how to spot traffic falling into Unassigned or Direct due to broken UTM parameters./common-metric-namesExact API field names for GA4 Data API queries. Avoid 400 errors from Universal Analytics names like ga:sessions or pageviews by using valid GA4 schema./compatible-combinationsWhich dimensions and metrics can be queried together in GA4 without triggering incompatible scope errors. Matrix of user, session, and event-level pairings./content-performanceEvaluate landing pages and blog content in GA4: screenPageViews, average engagement time, bounce rates, and organic search conversions per URL.Other plugins' skills for the same job