Agent skill · data analytics · sundial-org
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.
Why this skill is useful
Adds specific Python scripts for querying GA4 data that the AI wouldn't generate on its own.
What it needs
Requires python3 installed locally. Requires google-cloud account access. About 1k tokens when loaded. Last updated 2026-03-07. 639 stars on the source repository.
What this skill does
GA4 - Google Analytics 4 Data API Query GA4 properties for analytics data: page views, sessions, users, traffic sources, conversions, and more. Setup (one-time) 1. Enable Google Analytics Data API: https://console.cloud.google.com/apis/library/analyticsdata.googleapis.com 2. Create OAuth credentials or use existing Google Cloud project 3. Set environment variables: GA4PROPERTYID - Your GA4 property ID (numeric, e.g., "123456789") GOOGLECLIENTID - OAuth client ID GOOGLECLIENTSECRET - OAuth client secret GOOGLEREFRESHTOKEN - OAuth refresh token (from initial auth flow) Common Queries Top Pages (by pageviews) Top Pages with Sessions & Users Traffic Sources Landing Pages Custom Date Range Filter by Page Path Available Metrics Common metrics: screenPageViews, sessions, totalUsers, newUsers, activeUsers, bounceRate, averageSessionDuration, conversions, eventCount Available Dimensions Common dimensions: pagePath, pageTitle, landingPage, sessionSource, sessionMedium, sessionCampaignName, country, city, deviceCategory, browser, date Output Formats Default: Table format Add --json for JSON output Add --csv for CSV output
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills sundial-org/ga4