Pulls reports and metrics from GA4 using the Google Analytics Data API. You can query traffic overviews, user acquisition by channel, top pages, engagement metrics, conversion tracking, and audience segments. Requires Google OAuth credentials and a property ID, which the docs walk you through setting up. The curl examples cover the main report types you'd actually want: sessions, users, page views, bounce rates, conversion events, revenue by channel. It's straightforward if you already have GA4 running and just want to pull data into Claude without opening the Google Analytics UI. Date range shortcuts like "30daysAgo" and "today" make it easy to ask for recent windows.

skills.sh installs
531
GitHub stars
736
last updated
Aug 21, 2026

Install

$ npx -y skills add openclaudia/openclaudia-skills --skill google-analytics --agent claude-code

Installs into .claude/skills of the current project.

Files

Google Analytics (GA4)

Pull reports and insights from GA4 using the Google Analytics Data API.

Prerequisites

Requires Google OAuth credentials:

  • GOOGLE_CLIENT_ID
  • GOOGLE_CLIENT_SECRET
  • A valid OAuth access token (refreshed as needed)

Set credentials in .env, .env.local, or ~/.claude/.env.global.

Getting an Access Token

# Step 1: Get authorization code (user must visit this URL in browser)
echo "https://accounts.google.com/o/oauth2/v2/auth?client_id=${GOOGLE_CLIENT_ID}&redirect_uri=urn:ietf:wg:oauth:2.0:oob&scope=https://www.googleapis.com/auth/analytics.readonly&response_type=code&access_type=offline"

# Step 2: Exchange code for tokens
curl -s -X POST "https://oauth2.googleapis.com/token" \
  -d "code={AUTH_CODE}" \
  -d "client_id=${GOOGLE_CLIENT_ID}" \
  -d "client_secret=${GOOGLE_CLIENT_SECRET}" \
  -d "redirect_uri=urn:ietf:wg:oauth:2.0:oob" \
  -d "grant_type=authorization_code"

# Step 3: Refresh an expired token
curl -s -X POST "https://oauth2.googleapis.com/token" \
  -d "refresh_token={REFRESH_TOKEN}" \
  -d "client_id=${GOOGLE_CLIENT_ID}" \
  -d "client_secret=${GOOGLE_CLIENT_SECRET}" \
  -d "grant_type=refresh_token"

Sponsors

Details

Repository
github.com/openclaudia/openclaudia-skills
Categories
Backend & APIs, Data Science & ML, Marketing & SEO
First seen
Jun 3, 2026

More from openclaudia/openclaudia-skills

All 57
1cyberkaida avatardeep-analysiscyberkaida/reverse-engineering-assistantPerforms focused, depth-first investigation of specific reverse engineering questions through iterative analysis and database improvement. Answers questions lik530skills.sh installs
2hkuds avatarcli-anything-openscreenhkuds/cli-anythingCommand-line interface for Openscreen — a screen recording editor. A stateful CLI for editing screen recordings with zoom, speed ramps, trim, crop, annotations,530skills.sh installs
3openrouterteam avataropenrouter-imagesopenrouterteam/skillsGenerate images from text prompts and edit existing images using OpenRouter's dedicated Image API. Use when the user asks to create, generate, or make an image,529skills.sh installs
4longbridge avatarlongbridge-sec-filingslongbridge/skillsSEC EDGAR filing analysis via Longbridge — 10-K annual report, 10-Q quarterly, 8-K material events, proxy statement, insider Form 4. Extracts risk factors, MD&A524skills.sh installs
5agricidaniel avatarobsidian-basesagricidaniel/claude-obsidianExplain, draft, and validate Obsidian Bases .base files with filters, formulas, properties, summaries, and table, card, or list views. Use for Obsidian Bases, d523skills.sh installs
6secondsky avatarprogressive-web-appsecondsky/claude-skillsProgressive Web Apps with service workers, web manifest, offline support, installation prompts. Use for installable web apps, offline functionality, push notifi523skills.sh installs