用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/surendranb/google-analytics-mcp --skill date-ranges命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
The correct GA4 Data API names for fields models most often get wrong. Use these before calling `get_ga4_data` — wrong names return a hard error.
The correct shape for `dimension_filter` in `get_ga4_data`. Wrong structure returns an "Invalid dimension_filter" error. Use these templates.
Measure traffic arriving from AI tools — ChatGPT, Claude, Perplexity, Gemini, Copilot, and others — and understand how it behaves compared to other channels.
基于 SOC 职业分类
正在显示 SKILL.md
| name | date-ranges |
| description | How to specify date ranges in `get_ga4_data` and how to structure period-over-period comparisons. |
How to specify date ranges in get_ga4_data and how to structure
period-over-period comparisons.
date_range_start / date_range_end accept:
"YYYY-MM-DD" — absolute date, e.g. "2024-01-15"
"today" — current day (partial — use carefully)
"yesterday" — last complete day
"NdaysAgo" — N days back from today, e.g. "7daysAgo", "30daysAgo", "90daysAgo"
NdaysAgo excludes today. 7daysAgo to yesterday = last 7 complete days.
| Window | start | end |
|---|---|---|
| Last 7 days | 7daysAgo | yesterday |
| Last 28 days | 28daysAgo | yesterday |
| Last 90 days | 90daysAgo | yesterday |
| This month | YYYY-MM-01 | today |
| Last month | YYYY-MM-01 (prior) | YYYY-MM-last-day (prior) |
| Year to date | YYYY-01-01 | yesterday |
The GA4 Data API does not support multi-period in a single call. Run two
separate get_ga4_data calls, then compare the results.
Example: week-over-week
Call 1 — this week:
date_range_start: "7daysAgo"
date_range_end: "yesterday"
Call 2 — last week:
date_range_start: "14daysAgo"
date_range_end: "8daysAgo"
Example: year-over-year for July
Call 1 — this year:
date_range_start: "2025-07-01"
date_range_end: "2025-07-31"
Call 2 — last year:
date_range_start: "2024-07-01"
date_range_end: "2024-07-31"
Then compute the delta: (current - prior) / prior * 100 for each metric.
today includes only the hours elapsed so far. Comparing today to yesterday
is misleading — yesterday is a full day, today is partial.
For intra-day analysis, use today for both start and end and note the
IST hours covered in your interpretation.
"last7days" is NOT valid — use "7daysAgo""last-week" is NOT valid — use absolute dates or NdaysAgodate_range_end: "today" when comparing to a prior complete period"0daysAgo" = today (same as "today")