Skip to content

Pull GA4 reports, traffic metrics, and conversion data through the Google Analytics Data API.

CCM score
55 of 100
skills.sh installs
545
GitHub stars
753
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers traffic overview, user acquisition, top pages, engagement, conversions, and audience segments via POST requests to runReport
  • Includes ready-to-run curl examples, dimension and metric reference tables, and date range shortcuts such as 30daysAgo
  • Requires Google OAuth credentials and covers the token exchange, refresh, and property ID lookup steps
  • Designed for analysts who need quick GA4 reporting on sessions, channels, pages, and conversion events

Install

$ npx -y skills add openclaudia/openclaudia-skills --skill google-analytics -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

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"

Details

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

Questions

What does the google-analytics skill do?

google-analytics pulls GA4 reports, traffic data and insights from the Google Analytics Data API. It covers traffic overviews, user acquisition channels, top pages, engagement metrics, conversion tracking and audience segments.

What does google-analytics need before it can run?

google-analytics needs GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET set in .env, .env.local or ~/.claude/.env.global. It also needs a valid OAuth access token, which expires after one hour and has to be refreshed.

How do I install the google-analytics skill?

Run npx -y skills add openclaudia/openclaudia-skills --skill google-analytics -y in a project to install it. After that, google-analytics lets your agent answer questions about GA4 traffic, acquisition and conversions.

Where does google-analytics stand in its category?

google-analytics is listed in the Marketing, SEO & Ads category on Claude Marketplaces, next to seo-audit, content-strategy, marketing-psychology, ai-seo and programmatic-seo. It differs from those by reading live GA4 data for a property rather than auditing pages or writing content.

More from openclaudia/openclaudia-skills

All 57

Similar to Google Analytics

More Marketing, SEO & Ads