ga4-api-reporting

ga4-api-reporting is a skill for Claude Code from Ad-Superpowers/ad-superpowers-plugin. It costs 100 tokens per session (2,226 once invoked), scanned A, original, MIT.

A guide to using the Google Analytics 4 Data API, which lets software request website and app traffic data automatically. It covers report queries, available metrics and dimensions, authentication, and pagination.

In plain words
What is it for?
Running ad-hoc reports, extracting metrics and dimensions with scripts, and building automated GA4 reporting.
Why use it?
It helps developers retrieve GA4 data for custom reports and dashboards without manually copying it from the GA4 interface.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is run: python scripts/generate_report.py.

Part of the ad-superpowers plugin — 124 skills, 35 commands, 5 agents, 1 MCP server shipped together

Good fit Running ad-hoc reports, extracting metrics and dimensions with scripts, and building automated GA4 reporting.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/Ad-Superpowers/ad-superpowers-plugin
agentmods
npx agentmods add skills/ad-superpowers/ad-superpowers-plugin/ga4-api-reporting

Made for: Claude Code.

Or install ad-superpowers, the plugin that ships this one along with the rest of its 124 skills, 35 commands, 5 agents, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ga4-api-reporting

README.md
[![agentmods](https://agentmods.dev/badge/skills/ad-superpowers/ad-superpowers-plugin/ga4-api-reporting/github.svg)](https://agentmods.dev/skills/ad-superpowers/ad-superpowers-plugin/ga4-api-reporting)
Your own site
<a href="https://agentmods.dev/skills/ad-superpowers/ad-superpowers-plugin/ga4-api-reporting"><img src="https://agentmods.dev/badge/skills/ad-superpowers/ad-superpowers-plugin/ga4-api-reporting/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ga4-api-reporting

Your own site · 80×15
<a href="https://agentmods.dev/skills/ad-superpowers/ad-superpowers-plugin/ga4-api-reporting"><img src="https://agentmods.dev/badge/skills/ad-superpowers/ad-superpowers-plugin/ga4-api-reporting.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 100 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,226 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00100 $0.02226
Opus 5.5 $0.00040 $0.00890
Sonnet 5.5 $0.00020 $0.00445
Haiku 4.5 $0.00010 $0.00223

Measured 16d ago against content hash 7830086f341b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ga4-api-reporting scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 16d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugin/skills/ga4-api-reporting/SKILL.md · 345 lines

How it starts

The opening of the file, as written. The whole thing — 345 lines — stays where its author put it; the contents beside it link to each section on GitHub.

GA4 Data API Reporting Guide

Complete guide for using the GA4 Data API for custom reporting and automated dashboards.

Quick Note: Ad Superpowers MCP Tool

The Ad Superpowers MCP server wraps the GA4 Data API into the ga4_run_report() tool, which handles authentication. It returns up to 2,500 rows per call by default, fewer when a page would be too large for one response; when the response has partial: true, pass next_offset as offset to fetch the next page. Use it for ad-hoc analysis before building custom API integrations:

ga4_run_report(
    property_id="YOUR_PROPERTY_ID",
    metrics=["sessions", "activeUsers", "keyEvents"],
    dimensions=["date", "sessionDefaultChannelGroup"],
    start_date="30daysAgo",
    end_date="yesterday"
)

For programmatic/automated reporting, use the GA4 Data API v1 (v1beta) directly as documented below. The API base URL is analyticsdata.googleapis.com/v1beta/ — no v2 exists as of 2026.

Available Metrics & Dimensions

COMMONLY USED DIMENSIONS
=========================

USER & SESSION:
├── userId (custom user ID)
├── userAgeBracket
├── userGender
├── newVsReturning
├── sessionSource
├── sessionMedium
├── sessionSourceMedium
├── sessionCampaignName
└── sessionDefaultChannelGroup

TIME:
├── date (YYYYMMDD)
├── dateHour
├── dateHourMinute
├── dayOfWeek
├── hour
├── month
└── year

PAGE & SCREEN:
├── pagePath
├── pageTitle
├── pagePathPlusQueryString
├── landingPage
├── exitPage
└── screenName

DEVICE & GEO:
├── deviceCategory
├── platform
├── browser
├── operatingSystem
├── country
├── city
└── region

E-COMMERCE:
├── itemName
├── itemId
├── itemBrand
├── itemCategory
├── transactionId
└── orderCoupon

COMMONLY USED METRICS
======================

USERS & SESSIONS:
├── activeUsers
├── newUsers
├── totalUsers
├── sessions
├── sessionsPerUser
├── engagedSessions
├── averageSessionDuration
└── bounceRate

ENGAGEMENT:
├── screenPageViews
├── screenPageViewsPerSession
├── eventCount
├── engagementRate
└── userEngagementDuration

E-COMMERCE:
├── ecommercePurchases
├── transactions
├── purchaseRevenue
├── totalRevenue
├── averagePurchaseRevenue
├── itemsPurchased
├── itemRevenue
└── itemsViewed

KEY EVENTS (CONVERSIONS):
├── keyEvents (current metric name — was "conversions" before March 2024, both still work in API)
├── keyEventRate
├── eventValue
└── [customEvent]:eventCount

FULL LIST:
──────────
developers.google.com/analytics/devguides/reporting/data/v1/api-schema

Read the full file on GitHub · 345 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 16d ago Changed · +5 lines 7830086f341b
  2. 1mo ago Changed 40abcfb657f4
  3. 3mo ago First seen · 340 lines · 100 tokens per session scan A feb2f83269f4

Subscribe to this mod's changes

ga4-api-reporting is a skill published in the GitHub repository Ad-Superpowers/ad-superpowers-plugin (6 stars, last pushed 14d ago), licensed MIT. It adds 100 tokens to every session and 2,226 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

ga4-api-reporting compared with skills from other repositories

ga4-api-reporting next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ga4-api-reportingAd-Superpowers/ad-superpowers-pluginSkill614d agoMITA100Claude Code
analyticsLuuOW/meridian-mcpSkill01mo agoMITA33Claude Code, Codex
bot-traffic-detectionsurendranb/google-analytics-mcpSkill2424d agoMITA36Claude Code
creative-generatelogly/mureoSkill64yesterdayApache-2.0A131Claude Code
learnlogly/mureoSkill64yesterdayApache-2.0A98Claude Code
reddit-adsadkit/ads-skillsSkill443d agoMITA84Claude Code, Codex
tiktok-adsadkit/ads-skillsSkill443d agoMITA85Claude Code, Codex