ga4

Retrieve GA4 metrics and dimensions via the Analytics Data API with date filters.

239|30|Updated Jan 22, 2026
One-click install
npx skills add https://github.com/jdrhyne/agent-skills --skill ga4
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ga4
Source: https://github.com/jdrhyne/agent-skills/tree/main/skills/ga4
Command: npx skills add https://github.com/jdrhyne/agent-skills --skill ga4

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires google-auth-oauthlib, requests, google-analytics-data, google-auth, and includes scripts (resource) components.

What problem does it solve?

This skill provides programmatic access to GA4 data via the Analytics Data API, enabling teams to retrieve metrics and dimensions without manual querying.

Core Features & Use Cases

  • Retrieve common GA4 metrics such as page views, sessions, users, and conversions for any GA4 property.
  • Filter by date ranges and dimensions to create tailored dashboards and reports.
  • Use in marketing and product analytics to compare performance across pages, channels, or campaigns in automated workflows.

Quick Start

Ask the AI to fetch analytics data for a GA4 property, for example: "Query pagePath and screenPageViews for property 123456789 from 2026-01-01 to 2026-01-31".

Frequently Asked Questions about ga4

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I query GA4 analytics data via the API in Python?

To query GA4 analytics data via the API, use this skill to retrieve metrics and dimensions through the google-analytics-data Python library. It enables programmatic access to retrieve page views, sessions, and conversions without manual querying.

Can I filter GA4 API results by date ranges and dimensions?

Yes, you can filter GA4 API results by date ranges and dimensions. The skill supports querying across pages and traffic sources with date-range filters and optional dimension constraints to create tailored dashboards and reports.

Do I need Google OAuth credentials to access the Analytics Data API?

Yes, you need Google OAuth credentials to access the Analytics Data API. The skill leverages google-auth-oauthlib and google-auth dependencies to authenticate your requests and securely retrieve metrics for any GA4 property.

What's the best way to automate marketing analytics reports with GA4?

The best way to automate marketing analytics reports with GA4 is using this skill in automated workflows. It programmatically compares performance across pages, channels, or campaigns by retrieving metrics like users and conversions via the Analytics Data API.

Does this approach to retrieving GA4 metrics work with multiple properties?

Yes, this approach to retrieving GA4 metrics works with multiple properties. You can query any GA4 property by specifying its unique property ID alongside your desired date ranges and dimension constraints to fetch page views and sessions.