Google Analytics Skill for Openclaw

An advanced integration for querying GA4 properties to retrieve realtime metrics, historical reports, and property metadata.

whosc
v1.0.0
Mar 20, 2026
1
957
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install google-analytics-ga4

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install google-analytics-ga4 using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Google Analytics Skill?

The Google Analytics skill enables seamless interaction with Google Analytics 4 (GA4) properties via the Google Analytics Data API v1. It serves as a bridge for developers and data analysts to programmatically fetch granular data, ranging from current active users to complex historical performance reports across custom dimensions and metrics.

By leveraging this component within the Openclaw Skills ecosystem, users can automate reporting workflows and integrate live traffic data directly into their AI-driven environments. It simplifies the complexities of the GA4 schema, providing a structured way to discover valid API names and handle authentication via service accounts.

Google Analytics Skill Use Cases

  • Monitoring live site traffic and active user counts in real-time.
  • Generating automated weekly or monthly performance reports for stakeholders.
  • Auditing property metadata to identify available dimensions and metrics.
  • Exporting historical GA4 data to JSON for further processing in custom data pipelines.
  • Integrating traffic source and engagement rate data into team communication tools.

How Google Analytics Skill Works

  1. The skill authenticates with the Google Analytics Data API using a configured service account JSON key.
  2. Users specify the target GA4 property ID and the desired action (realtime, historical, or metadata).
  3. For data queries, the skill processes parameters such as date ranges, metrics (e.g., activeUsers), and dimensions (e.g., country).
  4. The skill sends a request to the Google Analytics v1 endpoint and parses the response.
  5. Results are formatted as human-readable Markdown tables or machine-readable JSON based on user preference.

Google Analytics Skill Setup

To get started with this entry in the Openclaw Skills library, follow these steps:

  1. Install Dependencies:
pip install google-analytics-data
  1. GCP Configuration: Enable the Google Analytics Data API in your Google Cloud Console and create a Service Account.
  2. Authentication: Generate a JSON key for your service account and save it as ga-credentials.json in the skill directory, or export the path:
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/your/ga-credentials.json"
  1. Access Control: Grant at least 'Viewer' permissions to the service account email within your Google Analytics Property Access Management settings.

Google Analytics Skill Data Schema & Taxonomy

The skill organizes output primarily in tabular or object formats. Key data entities include:

Entity Details
Metrics Quantitative measurements like activeUsers, sessions, and totalRevenue.
Dimensions Qualitative attributes such as deviceCategory, country, and pagePath.
Date Formats Supports absolute YYYY-MM-DD or relative terms like 7daysAgo and yesterday.
Output Modes Default Markdown for documentation or JSON for programmatic use.

Google Analytics Skill Advanced Features

  • Realtime window customization using the minute-range argument (e.g., 0-30 minutes).
  • Advanced pagination support using limit and offset for high-volume historical data.
  • Integration hooks for third-party notifications like DingTalk via webhooks.
  • Metadata discovery tools to dynamically list valid dimensions and metrics for any GA4 property.
  • Flexible credential management supporting both local files and environment variables within the Openclaw Skills framework.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*