تخطَّ إلى المحتوى
TakoAPI
العودة إلى المهارات

google-analytics-api

بواسطة rich-song

Data & Analytics
1.5kالتنزيلات وفق ما يذكره clawskills.sh
1النجوم
1المشاهدات
لا إعجاباتسجّل الدخول للإعجاب بهذه المهارة
—لم يُقيَّم بعد
تقييمك

موجز

Google Analytics API integration with managed.

الوصف

ما الذي تفعله هذه المهارة

Google Analytics API integration with managed OAuth via Maton. Covers both the Admin API for managing accounts, properties, and data streams, and the Data API for running reports on sessions, users, page views, and conversions.

Handles OAuth token management automatically, so you can query Google Analytics without implementing the full OAuth flow yourself.

متى تستخدمها

  • Pull 30-day traffic report by country for a client site
  • Check which pages get the most views this week
  • Set up a new GA4 property and web data stream
  • Query real-time active users during a product launch
  • List all accessible GA4 properties across accounts

مثال على سير العمل

الإدخال

User asks: Show me the top 10 pages by views for the last 30 days

الوكيل
  1. 1

    Retrieve MATON_API_KEY from environment

  2. 2

    Call GET /google-analytics-admin/v1beta/accountSummaries to find the target property ID

  3. 3

    POST to /google-analytics-data/v1beta/properties/{propertyId}:runReport with pagePath dimension, screenPageViews metric, 30daysAgo date range, and limit 10

  4. 4

    Parse response rows and sort by screenPageViews descending

الإخراج

Ranked list of the top 10 page paths with their view counts

المتطلبات

  • MATON_API_KEY environment variable
  • Maton account at maton.ai
  • Google Analytics OAuth connection configured at ctrl.maton.ai

التثبيت

clawhub install rich-song/google-analytics-api

شغّل أمر واجهة سطر الأوامر، أو الصق النص في Claude Code أو Cursor أو Codex أو أي وكيل برمجة تستخدمه.

الروابط