web-analytics
Use when the user mentions web analytics, GA4, Google Analytics, site traffic, page views, sessions, bounce rate, engagement rate, user behavior, session flow, site speed, traffic sources, acquisition channels, landing page performance, conversion tracking, UTM parameters, event tracking, behavioral analysis, Mixpanel, Amplitude, user journey, click path, scroll depth, or heatmap data. Also trigger on 'what's happening on our website' or 'where is traffic coming from.' For organic-search / keyword performance use seo-content; for step-by-step conversion drop-off use funnel-analysis; this skill is the foundational behavioral data layer. If GA4 data is not yet in the workspace, run data-extraction first.
- License 许可
- MIT
- 最近更新
- 2026-11-11
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- web-analytics
- description
- Use when the user mentions web analytics, GA4, Google Analytics, site traffic, page views, sessions, bounce rate, engagement rate, user behavior, session flow, site speed, traffic sources, acquisition channels, landing page performance, conversion tracking, UTM parameters, event tracking, behavioral analysis, Mixpanel, Amplitude, user journey, click path, scroll depth, or heatmap data. Also trigger on 'what's happening on our website' or 'where is traffic coming from.' For organic-search / keyword performance use seo-content; for step-by-step conversion drop-off use funnel-analysis; this skill is the foundational behavioral data layer. If GA4 data is not yet in the workspace, run data-extraction first.
- disable-model-invocation
- false
02 资源文件 8
- 参考文档references/authoring-notes.md1.7 KB
- 参考文档references/behavioral_patterns.md5.3 KB
- 参考文档references/ga4_api.md5.7 KB
- 其他routing-eval.jsonl930 B
- 脚本scripts/extract_ga4.py14.1 KB
- 脚本scripts/path_analysis.py28.3 KB
- 脚本scripts/predictive_scoring.py17.1 KB
- 脚本scripts/web_anomaly_detection.py14.9 KB
03 SKILL.md 正文
Web Analytics
GA4 extraction, normalized web metrics, seasonal anomaly detection, navigation path analysis, and predictive audience scoring — the behavioral data layer other skills build on.
Contract
Role: Advisory analyst and data layer. Extracts, normalizes, detects anomalies, and scores propensity; does not change the site or run experiments. All statistics and models run in deterministic Python scripts.
Mode:
quick— normalized metrics + anomaly detection.standard(default) — add navigation path and content-affinity analysis.deep— add predictive audiences and page-performance correlation.
When to use: GA4/traffic analysis, anomaly detection, session/path behavior, predictive audiences, landing-page performance.
When NOT to use: organic-search keyword/ranking work → seo-content;
funnel-step drop-off → funnel-analysis; clustering customers →
audience-segmentation. See ../../references/skill-index.md.
Evidence required (inputs):
workspace/raw/ga4_reports.csv— date, source, medium, page_path, sessions, conversions. Required. If absent, STOP and run data-extraction first (or use the google-analytics-mcp server /scripts/extract_ga4.pyto land it).workspace/raw/events.csv— event-level data (optional; enables path analysis).
Depends on: data-extraction. Feeds into: funnel-analysis, seo-content,
paid-media, audience-segmentation, experimentation, reporting. Builder detail in
references/authoring-notes.md.
Hard STOP (analysis validity): anomaly detection requires ≥8 weeks of history for a stable seasonal baseline. If history is shorter, STOP the anomaly step, report descriptive trends only, and label the seasonal baseline as unavailable — do not emit anomaly flags from an unstable decomposition.
Parse $ARGUMENTS for inline paths, date range, or Z-score threshold overrides.
Workflow
-
Validate inputs. Load
ga4_reports.csvand/orevents.csv; verify required columns. Normalize UTM parameters (lowercase source/medium, trim, URL-decode). -
Extract-source gate (AskUserQuestion). When fresh data is needed and both a live source and a stale file exist, ask before pulling:
- Question: "How should I source GA4 data?"
- Options: (a) Use the workspace CSV as-is — fastest, may be stale;
(b) Pull fresh via google-analytics-mcp — when the MCP server is connected;
(c) Run
scripts/extract_ga4.py— Data API fallback with named dimensions. Skip when the workspace file is fresh and sufficient.
-
Normalize metrics. Aggregate to daily traffic/engagement/conversion; write
workspace/processed/web_metrics.json. -
Anomaly detection. Run
scripts/web_anomaly_detection.py: STL seasonal decomposition (period=7) then Z-score residual flags. Apply the Hard STOP gate on history length first. -
Root-cause decomposition. For each anomaly, break the deviation down by source/medium, device, geography, and landing page; suppress known events (holidays, launches) when a suppression calendar is provided.
-
Navigation paths. Run
scripts/path_analysis.py: second-order (bigram) Markov transition matrices; top conversion paths, loops, dead-ends. -
Content affinity & exit pages. Conversion-lift ratio P(convert|category)/P(convert), ranked; exit-rate ranking weighted by conversion proximity. See
references/behavioral_patterns.md. -
Predictive audiences (deep mode). Run
scripts/predictive_scoring.py: logistic regression for convert/churn propensity on behavioral features; temporal holdout validation (target AUC > 0.70). -
Page performance (deep mode). Correlate load time with bounce rate, segmented by device.
-
Write outputs.
Output Format
Artifacts:
| File | Contents |
|---|---|
workspace/processed/web_metrics.json |
Normalized traffic/engagement/conversion metrics |
workspace/analysis/web_anomalies.json |
Anomalies with root-cause decomposition |
workspace/analysis/navigation_paths.json |
Common paths with conversion correlation |
workspace/analysis/predictive_audiences.json |
Convert/churn propensity scores |
Report states: history length used, anomaly threshold, path-analysis order, and predictive-model holdout AUC (or that scoring was skipped).
Financial services mode: track regulatory disclosure page views for compliance verification; authenticated investor-portal analytics require PII handling (GDPR, CCPA, SEC); report cookie-consent rate as a data-quality metric; verify required disclosures rendered before conversion events. Any customer-facing output routes through compliance-review.
Completion status:
DONE— metrics, anomalies, and requested behavioral artifacts written.DONE_WITH_CONCERNS— e.g., short history (anomalies skipped), missing events (no path analysis), or low predictive AUC.BLOCKED— no GA4 data and extraction unavailable; state the fix.NEEDS_CONTEXT— extraction-source choice unresolved by the user.
Anti-Patterns
- Emitting anomaly flags from fewer than 8 weeks of history.
- First-order Markov chains where bigram transitions are specified.
- Random (non-temporal) holdouts in predictive scoring — they leak the future.
- Skipping UTM normalization, so
Googleandgooglesplit traffic. - Reporting raw exit rate without conversion-proximity weighting.
- Letting the model estimate anomaly thresholds or propensity scores instead of the scripts.
04 同仓库更多 Skills
minimal-skill
Minimal shared skill fixture for marketplace renderer and validator examples.
roadmap
Use this skill when the user wants a product roadmap, initiative sequencing, Now/Next/Later plan, quarterly roadmap, release theme map, product strategy-to-roadmap translation, or executive roadmap narrative. Trigger on phrases like "build a roadmap", "roadmap these initiatives", "what should be now next later", "sequence this backlog", "quarterly product roadmap", "theme-based roadmap", or "plan the next two quarters". Do NOT trigger for drafting or reviewing a single PRD (use prd-writer or prd-review), converting a PRD into an agentic PLAN.md (use prd-to-plan), or scoring/ranking a set of options without a time horizon (use prioritization).
prioritization
Use this skill when the user wants to rank, score, triage, or compare product opportunities, features, PRD requirements, backlog items, roadmap candidates, or initiatives using RICE, impact-effort, confidence, reach, value, effort, risk, or tradeoff analysis. Trigger on phrases like "prioritize these features", "rank this backlog", "RICE score", "impact effort matrix", "what should we build first", "compare these initiatives", or "stack rank product bets". Do NOT trigger for a time-based roadmap (use roadmap), writing or reviewing one PRD (use prd-writer or prd-review), turning a PRD into an agentic plan (use prd-to-plan), or analyzing experiment results (use ab-testing or experimentation skills).
prd-writer
Use this skill whenever the user wants to write, draft, create, or scaffold a PRD (Product Requirements Document), spec, product brief, one-pager, or "working backwards" PR/FAQ from an idea, rough notes, discovery inputs, or an existing partial draft that needs authoring. Trigger on phrases like "write a PRD", "draft a spec", "product doc for X", "one-pager", "PR/FAQ", "feature brief", or when the user describes a feature/product idea and asks for it to be turned into a written requirements document. Do NOT trigger for critique or approval-readiness review of an existing PRD (use prd-review), engineering design docs, RFCs, ADRs, prioritization, roadmaps, or technical architecture documents. The output of this skill is always a markdown file (or section thereof) that a real product team could ship from.
prd-to-plan
Use this skill when the user has a PRD (Product Requirements Document), spec, or product brief and wants to turn it into an executable plan for agentic development — a plan that AI coding agents (Claude Code, sub-agents, orchestrators) can actually run. Trigger on phrases like "turn this PRD into a plan", "agentic plan", "execution plan", "task graph", "break this down for Claude Code", "decompose this spec", "build plan", "implementation plan from PRD", "scrum-master plan", or when the user provides a PRD/spec and asks "what's next" or "how do we build this with agents". The output is always a structured `PLAN.md` artifact with phases, tasks, dependencies, validation gates, sub-agent assignments, and context bundles. Do NOT trigger for: writing the PRD itself (use prd-writer), pure engineering design / RFC / ADR (architecture is a separate artifact), or generic project management plans without an agentic execution model.
prd-review
Use this skill when the user has an existing PRD, product spec, one-pager, or PR/FAQ and wants critique, approval-readiness review, quality-bar scoring, required changes, or a red-team pass. Trigger on phrases like "review this PRD", "critique my product spec", "is this PRD ready", "PRD quality bar", "red-team this requirements doc", "find gaps in this PR/FAQ", or "what would block approval". Do NOT trigger for drafting a new PRD from an idea (use prd-writer), converting an approved PRD into an agentic implementation plan (use prd-to-plan), building a roadmap (use roadmap), or ranking multiple initiatives (use prioritization).