google-analytics
Query Google Analytics 4 (GA4) data directly via the Analytics Data API. Use when you need website analytics like top pages, traffic sources, sessions, users, conversions, bounce rate, or any GA4 metrics and dimensions. Supports custom date ranges, filtering, and multi-metric queries. Calls analyticsdata.googleapis.com directly with no third-party proxy.
Why use this skill?
Integrate Google Analytics 4 directly with OpenClaw. Query website traffic, conversions, and user metrics seamlessly via the official GA4 Data API.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/codeninja23/native-google-analyticsWhat This Skill Does
The google-analytics skill empowers your OpenClaw agent to interact directly with the Google Analytics Data API (GA4). By bypassing third-party proxies, it maintains high security and data integrity while allowing you to query your website's performance metrics in real-time. Whether you need to monitor traffic spikes, identify top-performing content, or analyze user conversion funnels, this skill provides a direct pipeline to your property's underlying data using the official Google infrastructure.
Installation
Follow these steps to configure the skill:
- Create a Google Cloud project and navigate to the OAuth consent screen. Ensure the user type is 'Internal' for seamless access, or 'External' with appropriate scopes if using a personal account.
- Add the
https://www.googleapis.com/auth/analytics.readonlyscope. - Enable the 'Google Analytics Data API' in the Google Cloud Library.
- Create 'Desktop app' OAuth 2.0 credentials and store your Client ID and Client Secret securely.
- Obtain your GA4 Property ID from the Google Analytics Admin dashboard.
- Generate a refresh token using the provided Python script, ensuring you have
google-auth-oauthlibinstalled. - Finally, export these as environment variables:
GA4_PROPERTY_ID,GOOGLE_CLIENT_ID,GOOGLE_CLIENT_SECRET, andGOOGLE_REFRESH_TOKEN.
Use Cases
- Performance Reporting: Automate the generation of weekly executive summaries showing traffic growth and conversion rates.
- Content Strategy: Identify which blog posts or landing pages have the highest engagement or bounce rates to inform future content creation.
- Audience Insights: Analyze traffic sources to determine which channels (organic search, social media, paid ads) drive the most qualified leads.
- Anomaly Detection: Set up periodic checks to alert you if sessions or events deviate significantly from historical norms.
Example Prompts
- "Pull the top 10 pages by session count for the last 30 days and summarize the user engagement trends."
- "What is the conversion rate for our primary signup goal, and how does it compare to the previous month?"
- "Show me the breakdown of traffic sources for our e-commerce landing page over the past week."
Tips & Limitations
- Data Freshness: Note that GA4 data can have a processing latency of 24-48 hours.
- Rate Limits: Be mindful of Google's API quota limits when running intensive, multi-metric queries across large date ranges.
- Workspace Requirement: Using an Internal OAuth application requires a Google Workspace account; personal Gmail accounts will require additional verification steps if you change the scope or audience settings.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-codeninja23-native-google-analytics": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: network-access, external-api
Related Skills
hubspot
Query and manage HubSpot CRM data via the HubSpot API. Use when you need to search or manage contacts, companies, deals, tickets, or pipelines. Supports creating, updating, and associating CRM objects. Calls api.hubapi.com directly with no third-party proxy.
linear
Query and manage Linear issues, projects, cycles, and teams via the Linear GraphQL API. Use when you need to list or create issues, check cycle status, manage projects, or search across your workspace. Calls api.linear.app directly with no third-party proxy.
sentry
Read Sentry issues, events, and production errors via the Sentry REST API. Use when the user wants to inspect errors, list recent issues, get stack traces, or summarize production health. Requires SENTRY_AUTH_TOKEN with read-only scopes.
airtable
Read Airtable bases, tables, and records directly via the Airtable API. Use when you need spreadsheet/database data from Airtable. Calls api.airtable.com directly with no third-party proxy.
clawpod
Read any website or search Google, even when sites block bots or are geo-restricted. Handles CAPTCHAs, JavaScript rendering, and anti-bot protection server-side via residential proxies. Returns HTML or structured JSON.