Setup & Installation
Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:
Version History
- Added new metadata section to SKILL.md for environment variables, binaries, and file requirements. - Declared primary environment variable (GA4_PROPERTY_ID) and listed required scripts for openclaw compatibility. - Added a README.md file. - No changes to core functionality.
What This Skill Does
Queries Google Analytics 4 data directly via the Analytics Data API. Supports metrics like pageviews, sessions, users, bounce rate, and conversions across custom date ranges, dimensions, and filters. Calls the API directly without a third-party proxy.
Queries GA4 directly via the official API without requiring the Analytics UI or a third-party data connector.
When to use it
- Check which blog posts got the most traffic last month
- Compare sessions by traffic source after a campaign launch
- Find landing pages with high bounce rates
- Break down visitors by country or device type
- Pull conversion data by campaign name for a report
Example Workflow
Here's how your AI assistant might use this skill in practice.
User asks: What were my top 10 pages by pageviews this January?
- 1Reads GA4_PROPERTY_ID from environment
- 2Calls ga4_query.py with --metrics screenPageViews --dimension pagePath --start 2026-01-01 --end 2026-01-31 --limit 10
- 3Authenticates using GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, and GOOGLE_REFRESH_TOKEN
- 4Sends request to analyticsdata.googleapis.com
- 5Returns formatted table of pages and their pageview counts
A ranked table of page paths with pageview totals for January 2026
Requirements
Accounts, API keys, or tools you or your AI assistant may need to set up while using this skill.