← スキル一覧に戻る

ga4
by clawdbot
All versions of all skills that are on clawdhub.com archived
⭐ 7🍴 6📅 2026年1月24日
SKILL.md
name: ga4 description: Query Google Analytics 4 (GA4) data via the Analytics Data API. Use when you need to pull website analytics like top pages, traffic sources, user counts, sessions, conversions, or any GA4 metrics/dimensions. Supports custom date ranges and filtering. metadata: {"clawdbot":{"emoji":"📊","requires":{"bins":["python3"]}}}
GA4 - Google Analytics 4 Data API
Query GA4 properties for analytics data: page views, sessions, users, traffic sources, conversions, and more.
Setup (one-time)
- Enable Google Analytics Data API: https://console.cloud.google.com/apis/library/analyticsdata.googleapis.com
- Create OAuth credentials or use existing Google Cloud project
- Set environment variables:
GA4_PROPERTY_ID- Your GA4 property ID (numeric, e.g., "123456789")GOOGLE_CLIENT_ID- OAuth client IDGOOGLE_CLIENT_SECRET- OAuth client secretGOOGLE_REFRESH_TOKEN- OAuth refresh token (from initial auth flow)
Common Queries
Top Pages (by pageviews)
python3 scripts/ga4_query.py --metric screenPageViews --dimension pagePath --limit 30
Top Pages with Sessions & Users
python3 scripts/ga4_query.py --metrics screenPageViews,sessions,totalUsers --dimension pagePath --limit 20
Traffic Sources
python3 scripts/ga4_query.py --metric sessions --dimension sessionSource --limit 20
Landing Pages
python3 scripts/ga4_query.py --metric sessions --dimension landingPage --limit 30
Custom Date Range
python3 scripts/ga4_query.py --metric sessions --dimension pagePath --start 2026-01-01 --end 2026-01-15
Filter by Page Path
python3 scripts/ga4_query.py --metric screenPageViews --dimension pagePath --filter "pagePath=~/blog/"
Available Metrics
Common metrics: screenPageViews, sessions, totalUsers, newUsers, activeUsers, bounceRate, averageSessionDuration, conversions, eventCount
Available Dimensions
Common dimensions: pagePath, pageTitle, landingPage, sessionSource, sessionMedium, sessionCampaignName, country, city, deviceCategory, browser, date
Output Formats
Default: Table format
Add --json for JSON output
Add --csv for CSV output
スコア
総合スコア
65/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
✓最近の活動
3ヶ月以内に更新
+5
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
✓タグ
1つ以上のタグが設定されている
+5
レビュー
💬
レビュー機能は近日公開予定です