用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/surendranb/google-analytics-mcp --skill bot-traffic-detection命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | bot-traffic-detection |
| description | Identify and exclude bot, scraper, and spam sessions from GA4 data. |
Identify and exclude bot, scraper, and spam sessions from GA4 data.
Query sessions with very low or zero engagement:
dimensions: ["sessionDefaultChannelGroup", "sessionSource", "sessionMedium"]
metrics: ["sessions", "userEngagementDuration", "bounceRate", "screenPageViewsPerSession"]
date_range: last 7–14 days
Bot signals: userEngagementDuration near 0, screenPageViewsPerSession exactly 1,
bounceRate at 1.0 (100%).
dimensions: ["sessionSource", "sessionMedium", "sessionDefaultChannelGroup"]
metrics: ["sessions", "userEngagementDuration", "newUsers"]
dimension_filter: sessionMedium = "referral"
Flag sources where userEngagementDuration / sessions < 2 seconds.
dimensions: ["hostname"]
metrics: ["sessions", "screenPageViews"]
Bot traffic often hits unexpected hostnames (staging domains, raw IPs, or hostnames you don't own). Filter to your known production hostnames.
dimensions: ["country", "city", "sessionSource"]
metrics: ["sessions", "userEngagementDuration"]
dimension_filter: country = [countries with no expected traffic]
Clusters of sessions from unexpected countries with 0 engagement = bot signal.
GA4 does not have a native bot filter toggle beyond the automatic Google filter. To exclude suspected bot traffic from your analysis, add a dimension filter:
dimension_filter: {
"filter": {
"fieldName": "sessionDefaultChannelGroup",
"stringFilter": {"matchType": "EXACT", "value": "Direct"}
}
}
…combined with a metric filter on userEngagementDuration > 0.
Note: GA4 already filters known bots automatically. What remains are unknown/new bots and scrapers that mimic real browser behaviour.