ga4-api-reporting

ga4-api-reporting is a skill for Claude Code, Codex from Ad-Superpowers/ad-superpowers-plugin. It costs 100 tokens per session (2,122 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 CodeCodex

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

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

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

Made for: Claude Code, Codex.

Or install ad-superpowers, the plugin that ships this one along with the rest of its 17 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.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.svg" alt="Measured on agentmods" 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,122 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00100 $0.02122
Opus 5 $0.00050 $0.01061
Sonnet 5 $0.00020 $0.00424
Haiku 4.5 $0.00010 $0.00212

Measured 5d ago against content hash feb2f83269f4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 5d 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 · 340 lines

How it starts

The opening of the file, as written. The whole thing — 340 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 and pagination automatically. 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 · 340 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. 5d 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 (5 stars, last pushed 7d ago), licensed MIT. It adds 100 tokens to every session and 2,122 once invoked, about $0.0005 per session on Opus 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.