ga4-api

Fetch Google Analytics 4 reports via the googleapis REST client.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/ketzal88/ai-analyzer --skill ga4-api
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ga4-api
Source: https://github.com/ketzal88/ai-analyzer/tree/main/.claude/skills/ga4-api
Command: npx skills add https://github.com/ketzal88/ai-analyzer --skill ga4-api

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides expert capabilities for fetching and interpreting Google Analytics 4 (GA4) data, enabling users to understand website performance, user behavior, and marketing effectiveness.

Core Features & Use Cases

  • Fetch GA4 Reports: Retrieve core web analytics metrics (sessions, users, engagement) and ecommerce funnel data.
  • Analyze Traffic Sources & Landing Pages: Understand where users come from and which pages they land on.
  • Troubleshoot API Issues: Address common GA4 API errors, including authentication and scope problems.
  • Use Case: A marketing analyst needs to report on the performance of a recent campaign. They can use this Skill to fetch daily sessions, users, and conversion data from GA4 for the campaign period, broken down by traffic source.

Quick Start

Use the ga4-api skill to fetch the total sessions and users for the last 7 days from property ID '123456789'.

Frequently Asked Questions about ga4-api

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

FAQPage Schema
How do I fetch Google Analytics 4 web analytics reports programmatically?

You can fetch Google Analytics 4 reports programmatically by using the googleapis REST client to retrieve core web metrics like sessions, users, and engagement data for a specified property ID.

Can I pull ecommerce funnel metrics and traffic source breakdowns from GA4?

Yes, you can pull ecommerce funnel metrics and traffic source breakdowns from GA4 to analyze user behavior, identify where visitors originate, and measure marketing effectiveness.

What's the best way to authenticate with the Google Analytics 4 API using OAuth2?

The best way to authenticate with the Google Analytics 4 API is by configuring OAuth2 credentials, which authorizes the googleapis REST client to securely fetch your web analytics data.

Why does my Google Analytics 4 API request keep failing with authentication errors?

Google Analytics 4 API requests fail with authentication errors due to incorrect OAuth2 credentials or invalid scope configurations, which must be resolved to restore data fetching access.

How do I retrieve landing page performance data from GA4?

You retrieve landing page performance data from GA4 by requesting specific report dimensions via the googleapis REST client, allowing you to understand exactly which pages users land on.