From analytics
You are an expert in the SAS-AM Website Analytics system. This system collects data from Google Analytics 4 (GA4) and Google Search Console, stores it in SQLite, and visualises it through Docker-based Grafana dashboards.
How this skill is triggered — by the user, by Claude, or both
Slash command
/analytics:website-analyticsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are an expert in the SAS-AM Website Analytics system. This system collects data from Google Analytics 4 (GA4) and Google Search Console, stores it in SQLite, and visualises it through Docker-based Grafana dashboards.
You are an expert in the SAS-AM Website Analytics system. This system collects data from Google Analytics 4 (GA4) and Google Search Console, stores it in SQLite, and visualises it through Docker-based Grafana dashboards.
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Google APIs │ -> │ Python Scripts │ -> │ SQLite Database │
│ (GA4 + Console) │ │ (Data Collection)│ │ │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│
┌─────────────────┐ ┌─────────────────┐ │
│ Grafana │ <- │ Docker Container│ <-----------┘
│ Dashboards │ │ │
└─────────────────┘ └─────────────────┘
The Website Analytics project is located at:
/Users/sasreliability/Documents/Repos/Website Analytics/
Access Grafana at http://localhost:8000 (credentials: admin / admin123)
| Dashboard | URL | Purpose |
|---|---|---|
| Traffic Overview | /d/traffic-overview | User metrics, device breakdown, geographic data |
| Search Performance | /d/search-performance | Keyword rankings, CTR, search trends |
| Page Performance | /d/page-performance | Page views, session data, referrer analysis |
| User Experience | /d/user-experience | Engagement metrics, bounce rate, session duration |
| Campaign Performance | /d/campaign-performance | LinkedIn/Google Ads tracking, UTM analysis |
The SQLite database (website_analytics.db) contains these tables:
Google Search Console metrics:
Date, Page, Query, Device, CountryClicks, Impressions, CTR, PositionGoogle Analytics user behaviour:
Date, Source, Medium, Campaign, Country, Device CategoryTotal Users, New Users, SessionsEngagement Rate, Bounce Rate, Average Session Duration (secs)Page performance metrics:
Date, Page Title, Page Path, ReferrerPage Views, Sessions, Engagement TimeConsolidated analytics combining all sources.
Update tracking and metadata.
# Full data collection (GA4 + Search Console)
cd "/Users/sasreliability/Documents/Repos/Website Analytics"
python3 "automated data pull.py"
# Via cron job (runs daily at 5:28 AM)
./scripts/run-data-collection.sh
# Start Grafana
docker compose up -d
# Restart after changes
docker compose restart grafana
# View logs
docker compose logs -f grafana
# Open dashboard
open http://localhost:8000
# Check table counts
sqlite3 website_analytics.db "SELECT 'console_data' as tbl, COUNT(*) as rows FROM console_data UNION ALL SELECT 'user_data', COUNT(*) FROM user_data UNION ALL SELECT 'page_data', COUNT(*) FROM page_data;"
# Check latest data date
sqlite3 website_analytics.db "SELECT MAX(Date) FROM user_data;"
# Test dashboard queries
python3 scripts/test-queries.py
The frser-sqlite-datasource plugin requires specific query formatting:
SELECT
strftime('%Y-%m-%dT%H:%M:%SZ', Date) as time,
SUM("Page Views") as "Page Views"
FROM page_data
WHERE Date >= date('now', '-${period}')
GROUP BY DATE(Date)
ORDER BY time;
Important: Use timeColumns: ["time"] in the target configuration.
SELECT SUM("Total Users") as value
FROM user_data
WHERE Date >= date('now', '-${period}');
SELECT Country, SUM("Total Users") as Users
FROM user_data
WHERE Date >= date('now', '-30 days')
GROUP BY Country
ORDER BY Users DESC
LIMIT 10;
docker compose pssqlite3 website_analytics.db "SELECT MAX(Date) FROM user_data;"python3 scripts/test-queries.pywebsite-analytics-sqliteSAS.json service account file exists# Reset admin password
docker compose exec grafana grafana cli admin reset-admin-password newpassword
# Restart to clear lockouts
docker compose restart grafana
| Metric | Description | Good Value |
|---|---|---|
| Engagement Rate | % of sessions with engagement (>10s, conversion, or 2+ pages) | >50% |
| Bounce Rate | % of single-page sessions | <50% |
| CTR | Search Console click-through rate | >3% |
| Average Position | Search ranking position | <10 |
| Session Duration | Time spent on site (in seconds) | >60s |
Track which LinkedIn posts drive traffic via UTM parameters:
utm_source=linkedinutm_medium=organic or utm_medium=paid_socialIdentify high-traffic pages that indicate prospect interest areas.
Set up alerts for traffic anomalies or milestone achievements.
| File | Purpose |
|---|---|
automated data pull.py | Main data collection orchestrator |
Website_Analytics.py | SEO analysis tools |
website_analytics.db | SQLite database |
grafana/dashboards/*.json | Dashboard definitions |
grafana/provisioning/ | Grafana auto-provisioning config |
scripts/setup.sh | Initial setup script |
scripts/update-data.sh | Data refresh with Grafana restart |
docker-compose.yml | Docker configuration |
Dockerfile | Grafana container build |
npx claudepluginhub sas-asset-management/sasamclaudecodeskills --plugin analyticsAnalyzes Google Analytics 4 data to review website performance, traffic patterns, bounce rates, and conversions. Generates actionable reports including SEO daily reports with organic KPIs, anomaly detection, and prioritized recommendations.
Drives Google Analytics (GA4), Google Tag Manager, Google Search Console, and BigQuery from chat for tracking plans, reports, conversion setup, audits, and SQL queries.
Extracts structured metrics from authenticated analytics dashboards and internal web tools using Firecrawl browser. Supports date-range filtering, tab navigation, and table export.