kernel8901/ai-agent-skills-classification/google-analytics-api
Claude Code and agent skill by kernel8901/ai-agent-skills-classification
- community
Checking that the SKILL.md file is still in the repository.
Google Analytics API integration with managed OAuth. Manage accounts, properties, and data streams (Admin API). Run reports on sessions, users, page views, and conversions (Data API). Use this skill when users want to configure or query Google Analytics. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway).
Install
npx vskill@latest install kernel8901/ai-agent-skills-classification/google-analytics-apiSKILL.md
The same SKILL.md was published earlier as kernel8901/ai-agent-skills-classification/google-analytics-api.
Google Analytics
Access Google Analytics with managed OAuth authentication. This skill covers both the Admin API (manage accounts, properties, data streams) and the Data API (run reports on metrics).
Quick Start
Base URLs
Admin API (manage accounts, properties, data streams):
Data API (run reports):
Replace {native-api-path} with the actual Google Analytics API endpoint path. The gateway proxies requests to analyticsadmin.googleapis.com and analyticsdata.googleapis.com and automatically injects your OAuth token.
Authentication
All requests require the Maton API key in the Authorization header:
Environment Variable: Set your API key as MATON_API_KEY:
Getting Your API Key
- Sign in or create an account at maton.ai
- Go to maton.ai/settings
- Copy your API key
Connection Management
Manage your Google OAuth connections at https://ctrl.maton.ai.
Important: The Admin API and Data API use separate connections:
google-analytics-admin- Required for Admin API endpoints (manage accounts, properties, data streams)google-analytics-data- Required for Data API endpoints (run reports)
Create the connection(s) you need based on which API you want to use.
List Connections
Create Connection
Get Connection
Response:
Open the returned url in a browser to complete OAuth authorization.
Delete Connection
Specifying Connection
If you have multiple Google Analytics connections, specify which one to use with the Maton-Connection header:
If omitted, the gateway uses the default (oldest) active connection.
Admin API Reference
Accounts
Properties
Create Property
Data Streams
Create Web Data Stream
Custom Dimensions
Create Custom Dimension
Conversion Events
Data API Reference
Run Report
Run Realtime Report
Batch Run Reports
Get Metadata
Common Report Examples
Page Views by Page
Users by Country
Traffic Sources
Common Dimensions
date,country,city,deviceCategorypagePath,pageTitle,landingPagesessionSource,sessionMedium,sessionCampaignName
Common Metrics
activeUsers,newUsers,sessionsscreenPageViews,bounceRate,averageSessionDurationconversions,eventCount
Date Formats
- Relative:
today,yesterday,7daysAgo,30daysAgo - Absolute:
2026-01-01
Code Examples
JavaScript
Python
Notes
- GA4 properties only (Universal Analytics not supported)
- Property IDs are numeric (e.g.,
properties/521310447) - Use
accountSummariesto quickly list all accessible properties - Use
updateMaskfor PATCH requests in Admin API - Use metadata endpoint to discover available dimensions/metrics
- IMPORTANT: When using curl commands, use
curl -gwhen URLs contain brackets (fields[],sort[],records[]) to disable glob parsing - IMPORTANT: When piping curl output to
jqor other commands, environment variables like$MATON_API_KEYmay not expand correctly in some shell environments. You may get "Invalid API key" errors when piping.
Error Handling
| Status | Meaning | |
|---|---|---|
| 400 | Missing Google Analytics connection | |
| 401 | Invalid or missing Maton API key | |
| 429 | Rate limited (10 req/sec per account) | |
| 4xx/5xx | Passthrough error from Google Analytics API |
Resources
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking数据与分析/google-analytics-api/SKILL.md
Popularity
- Repository stars
- 4
- 7-day trend score
- 8
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/kernel8901/ai-agent-skills-classification/google-analytics-api)