jdrhyne/ga4
Query Google Analytics 4 (GA4) data via the Analytics Data API. Use when you need to pull website analytics like top pages, traffic sources, user counts, sessions, conversions, or any GA4 metrics/dimensions. Supports custom date ranges and filtering.
npx skills add https://github.com/jdrhyne/agent-skills --skill ga4
Query GA4 properties for analytics data: page views, sessions, users, traffic sources, conversions, and more.
GA4_PROPERTY_ID - Your GA4 property ID (numeric, e.g., "123456789")GOOGLE_CLIENT_ID - OAuth client IDGOOGLE_CLIENT_SECRET - OAuth client secretGOOGLE_REFRESH_TOKEN - OAuth refresh token (from initial auth flow)python3 scripts/ga4_query.py --metric screenPageViews --dimension pagePath --limit 30
python3 scripts/ga4_query.py --metrics screenPageViews,sessions,totalUsers --dimension pagePath --limit 20
python3 scripts/ga4_query.py --metric sessions --dimension sessionSource --limit 20
python3 scripts/ga4_query.py --metric sessions --dimension landingPage --limit 30
python3 scripts/ga4_query.py --metric sessions --dimension pagePath --start 2026-01-01 --end 2026-01-15
python3 scripts/ga4_query.py --metric screenPageViews --dimension pagePath --filter "pagePath=~/blog/"
Common metrics: screenPageViews, sessions, totalUsers, newUsers, activeUsers, bounceRate, averageSessionDuration, conversions, eventCount
Common dimensions: pagePath, pageTitle, landingPage, sessionSource, sessionMedium, sessionCampaignName, country, city, deviceCategory, browser, date
Default: Table format
Add --json for JSON output
Add --csv for CSV output
Take jdrhyne/ga4 from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.