baneeishaque/ljt-520_openclaw-backup/native-google-analytics
Claude Code and agent skill by baneeishaque/ljt-520_openclaw-backup
- community
Checking that the SKILL.md file is still in the repository.
Author "baneeishaque" has blocked skill(s)
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.
Install
npx vskill@latest install baneeishaque/ljt-520_openclaw-backup/native-google-analyticsSKILL.md
Google Analytics 4
Query GA4 properties directly via the Google Analytics Data API (analyticsdata.googleapis.com).
Setup (one-time)
1. Create a Google Cloud project (or use an existing one)
Go to https://console.cloud.google.com and create or select a project.
2. Set the OAuth consent screen to Internal
Go to APIs & Credentials > OAuth consent screen > Audience and set:
- User type: Internal
This avoids Google's app verification process (which requires a demo video for sensitive scopes like Analytics). Internal is fine for personal/team use. Note: this requires a Google Workspace account (not a personal @gmail.com).
If you must use External (e.g. you have a personal Gmail), set publishing status to "In production" and add the analytics.readonly scope under Data Access / Scopes.
3. Add the Analytics scope
Go to OAuth consent screen > Data Access (or Scopes) and add:
This is listed as a "sensitive scope" by Google. If your app is Internal, no verification is needed.
4. Enable the Analytics Data API
Go to: https://console.cloud.google.com/apis/library/analyticsdata.googleapis.com
Click Enable.
5. Create OAuth 2.0 credentials
Go to APIs & Credentials > Credentials > Create Credentials > OAuth client ID
- Application type: Desktop app
- Name: anything you want
Save the Client ID and Client Secret.
6. Get your GA4 Property ID
Go to https://analytics.google.com > Admin (gear icon) > Property Settings. The Property ID is the numeric value at the top.
7. Generate a refresh token
Run this on your local machine (needs a browser for the Google login flow):
Replace YOUR_CLIENT_ID and YOUR_CLIENT_SECRET with your values. A browser window will open for you to log in with Google. Copy the refresh token from the output.
8. Set environment variables
Troubleshooting
- 403 HTML error page: The
analytics.readonlyscope is probably not added to your OAuth consent screen. Go to Data Access/Scopes and add it, then regenerate your refresh token. - 403 JSON error "caller does not have permission": Your Google account doesn't have access to the GA4 property. Check Admin > Property Access Management in Google Analytics.
- Token refresh fails: Your refresh token may be expired. Regenerate it using step 7.
Queries
Top pages by pageviews
Top pages with sessions and users
Traffic sources
Traffic by source and medium
Landing pages
Custom date range
Filter by path prefix
Conversions by campaign
Device breakdown
Country breakdown
Common metrics
screenPageViews, sessions, totalUsers, newUsers, activeUsers, bounceRate, averageSessionDuration, conversions, eventCount, engagementRate, userEngagementDuration
Common dimensions
pagePath, pageTitle, landingPage, sessionSource, sessionMedium, sessionCampaignName, country, city, deviceCategory, browser, date, week, month
Output
Results are printed as a formatted table to stdout. Pipe to | python3 -m json.tool if you need raw JSON.
Security
- Security scanPassed, 90 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 repositoryCheckingskills/codeninja23/native-google-analytics/SKILL.md
Popularity
- 7-day trend score
- 0
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/baneeishaque/ljt-520_openclaw-backup/native-google-analytics)