Use this skill when the user asks about analytics, GA4, Google Analytics, Plausible, Core Web Vitals (CWV), PageSpeed or page speed, LCP, CLS, INP, TTFB, FCP, traffic reports, traffic analysis, site performance metrics, web vitals, real user metrics, or when they mention monitoring WordPress site analytics and performance data.
Unified analytics covering 3 platforms (GA4, Plausible, Core Web Vitals) with 14 MCP tools. These tools enable traffic analysis, audience insights, performance monitoring, and cross-platform reporting directly from the WordPress management environment. By combining data from multiple analytics sources, you can build comprehensive performance dashboards, identify optimization opportunities, and track real user experience metrics.
What analytics platform?
Run detection first:
node skills/wp-analytics/scripts/analytics_inspect.mjs [--cwd=/path/to/project]
This identifies configured analytics credentials and installed plugins.
| Service | Tools | Auth Type | Use Case |
|---------|-------|-----------|----------|
| Google Analytics 4 | 6 tools (ga4_*) | Service Account JSON | Traffic, audience, conversions |
| Plausible Analytics | 4 tools (pl_*) | API Key | Privacy-friendly traffic metrics |
| Core Web Vitals | 4 tools (cwv_*) | Google API Key | Performance and user experience |
See references/ga4-integration.md
See references/plausible-setup.md
See references/cwv-monitoring.md
See references/analytics-dashboards.md
See references/analytics-dashboards.md
See references/traffic-attribution.md
See references/signals-feed-schema.md
.content-state/signals-feed.md from analytics data| File | Content |
|------|---------|
| references/ga4-integration.md | GA4 Data API setup, service account, dimensions/metrics, quotas |
| references/plausible-setup.md | Plausible API key, self-hosted vs cloud, metrics, periods |
| references/cwv-monitoring.md | CWV metric definitions, thresholds, PageSpeed/CrUX APIs |
| references/analytics-dashboards.md | Dashboard patterns, report templates, KPIs, combined data |
| references/traffic-attribution.md | UTM params, source/medium, GA4 + WooCommerce conversions |
| references/signals-feed-schema.md | NormalizedEvent format, delta rules, pattern matching, anomaly detection |
.content-state/{site_id}.config.md exists for the target siteCOLLECT → BASELINE → NORMALIZE → DELTA → ANOMALY → PATTERN → WRITE
7.1 COLLECT — Gather current period data
Call the following MCP tools for the requested period (default: last 30 days):
| Tool | Data Collected | Entity Type |
|------|---------------|-------------|
| ga4_top_pages | Top 20 pages by pageviews, sessions, engagement time | Page |
| ga4_traffic_sources | Source/medium breakdown with sessions, bounce rate | Source |
| ga4_report | Site-level aggregate: total sessions, pageviews, conversions | Site |
| gsc_search_analytics | Top 20 keywords by impressions, clicks, CTR, position | Keyword |
| pl_aggregate | If Plausible configured: visitors, pageviews, bounce_rate | Site (cross-validate) |
| cwv_crux_origin | If CrUX available: LCP, CLS, INP, FCP, TTFB | Site |
Not all tools need to succeed. Generate events only from tools that return data. Record which tools contributed in source_tools frontmatter.
7.2 BASELINE — Load comparison period data
Read the existing .content-state/signals-feed.md if present. Extract the period and events to use as baseline for delta calculation.
If no previous feed exists:
delta_pct fields)Record the comparison period in comparison_period frontmatter field.
7.3 NORMALIZE — Map to NormalizedEvent format
For each data point from 7.1, create a NormalizedEvent:
- entity_id: "{EntityType}:{identifier}"
relation: "{metric_name}"
value: {numeric_value}
unit: "{count|seconds|percentage|position}"
ts: "{period_end_ISO8601}"
provenance:
source_id: "{mcp_tool_name}"
site: "{site_id}"
Entity ID mapping:
Page:{page_path}Source:{source_name}Site:{site_id}Keyword:{query}Site:{site_id} with relation = metric nameRelation mapping:
screenPageViews → pageviewssessions → sessions (page) or total_sessions (site)averageSessionDuration → avg_engagement_timebounceRate → bounce_rateimpressions → search_impressionsclicks → search_clicksctr → search_ctrposition → search_positionlcp, cls, inp)All CWV time-based metrics are normalized to seconds. API values in milliseconds should be divided by 1000.
7.4 DELTA — Calculate percentage changes
For each NormalizedEvent, find the matching baseline event (same entity_id + relation):
delta_pct = round(((current_value - baseline_value) / baseline_value) * 100)
Edge cases:
delta_pct: +999delta_pct: 0delta_pct7.5 ANOMALY — Identify significant changes
Read anomaly_threshold from feed config (default: 30). Filter events where |delta_pct| >= anomaly_threshold.
7.6 PATTERN — Match GenSignal patterns
Check each anomaly against 3 detectable patterns:
Search Intent Shift:
Keyword:*search_ctr delta ≥ +20% with search_position delta ≤ +5%, OR search_impressions delta ≥ +50% on keywords with commercial modifiers, OR search_impressions delta ≥ +100% on any keywordEarly-Adopter Surge:
Source:*referral_sessions delta ≥ +50% AND site-level total_sessions delta < +20%Hype→Utility Crossover:
Page:*avg_engagement_time delta ≥ +15% AND bounce_rate delta ≤ -10% AND pageviews delta between -20% and +10%No pattern match → "Unclassified anomaly" / "Review: investigate cause"
7.7 WRITE — Generate signals-feed.md
Write .content-state/signals-feed.md with YAML frontmatter and organized body sections. See references/signals-feed-schema.md for exact format.
After writing, present summary to user:
Signal Feed generato per {site_id}:
- Periodo: {period}
- Eventi normalizzati: {count}
- Anomalie rilevate: {anomaly_count}
- Pattern riconosciuti: {pattern_list}
Anomalie principali:
1. {entity} — {relation} {delta}% → {pattern}: {action}
2. ...
Per approfondire un segnale con GenSignal: "approfondisci il segnale N con GenSignal"
Per creare brief dai segnali: "crea brief per i segnali azionabili"
| Tool | Description |
|------|-------------|
| ga4_report | Run a GA4 Data API report with custom dimensions and metrics |
| ga4_realtime | Get GA4 real-time active users and events |
| ga4_top_pages | Get top pages by pageviews, sessions, or engagement |
| ga4_traffic_sources | Get traffic source breakdown (source, medium, campaign) |
| ga4_conversions | Get conversion event data and goal completions |
| ga4_audience | Get audience demographics and technology breakdown |
| pl_aggregate | Get aggregate Plausible metrics for a time period |
| pl_timeseries | Get Plausible time-series data with configurable intervals |
| pl_breakdown | Get Plausible breakdown by property (page, source, country) |
| pl_realtime | Get Plausible real-time visitor count |
| cwv_pagespeed | Run PageSpeed Insights analysis on a URL |
| cwv_crux_url | Get CrUX real user metrics for a specific URL |
| cwv_crux_origin | Get CrUX real user metrics for an entire origin |
| cwv_history | Get CrUX historical Core Web Vitals data |
Use the wp-monitoring-agent for automated analytics reporting, performance alerting, and scheduled dashboard generation that combines data across all three platforms.
wp-search-console — combine search analytics with traffic data for full SEO visibilitywp-content-optimization — use analytics data to prioritize content optimization effortswp-content-attribution — track content sources and attribute traffic to specific campaignswp-monitoring — monitor site uptime and health alongside analytics performancewp-content-pipeline — use signal insights to create content briefs for publishingwp-search-console for combined Google data workflowswp-performance for technical optimizationwp-social-email for campaign trackingwp-monitoring alerting workflowswp-content-pipeline for data-driven content creation| Issue | Cause | Resolution | |-------|-------|------------| | GA4 returns empty data | Service account lacks Viewer role | Grant "Viewer" role on the GA4 property | | GA4 quota exceeded | Too many API requests | Reduce request frequency; use date ranges instead of daily calls | | Plausible 401 error | Invalid or expired API key | Regenerate API key in Plausible dashboard | | Plausible returns no data | Site domain mismatch | Ensure site_id matches the domain registered in Plausible | | CWV "API key not valid" | Google API key missing or restricted | Enable PageSpeed Insights API in Google Cloud Console | | CWV no CrUX data | Low-traffic page | CrUX requires sufficient real user traffic; use lab data instead | | Detection script exit 1 | No analytics config found | Add ga4_property_id, plausible_api_key, or google_api_key to WP_SITES_CONFIG | | Plugin detected but no API data | Plugin handles tracking only | Plugins embed tracking code; API access requires separate credentials |
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer
Tags:analytics, ga4, plausible, cwv, pagespeed, core-web-vitals