ga4-report

ga4-report is a command for Claude Code from ivanovzlatan2/data-arsenal-v1. It costs 11 tokens per session (590 once invoked), scanned A, original, MIT.

A command for creating custom reports from Google Analytics 4 (GA4), Google's website and app measurement service, using selected measures and categories.

In plain words
What is it for?
Use it to report on traffic, daily sessions, landing pages, revenue, or other GA4 data by choosing metrics, dimensions, date ranges, and result limits.
Why use it?
It turns a reporting question into the GA4 settings needed to retrieve the relevant data.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the data-arsenal plugin — 5 commands shipped together

Good fit Use it to report on traffic, daily sessions, landing pages, revenue, or other GA4 data by choosing metrics, dimensions, date ranges, and result limits.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/ivanovzlatan2/data-arsenal-v1/ga4-report
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.

Clone the repo
git clone --depth 1 https://github.com/ivanovzlatan2/data-arsenal-v1

Made for: Claude Code.

Or install data-arsenal, the plugin that ships this one along with the rest of its 5 commands.

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-report

README.md
[![agentmods](https://agentmods.dev/badge/commands/ivanovzlatan2/data-arsenal-v1/ga4-report/github.svg)](https://agentmods.dev/commands/ivanovzlatan2/data-arsenal-v1/ga4-report)
Your own site
<a href="https://agentmods.dev/commands/ivanovzlatan2/data-arsenal-v1/ga4-report"><img src="https://agentmods.dev/badge/commands/ivanovzlatan2/data-arsenal-v1/ga4-report/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-report

Your own site · 80×15
<a href="https://agentmods.dev/commands/ivanovzlatan2/data-arsenal-v1/ga4-report"><img src="https://agentmods.dev/badge/commands/ivanovzlatan2/data-arsenal-v1/ga4-report.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 590 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.00011 $0.00590
Opus 5 $0.00005 $0.00295
Sonnet 5 $0.00002 $0.00118
Haiku 4.5 $0.00001 $0.00059

Measured 11d ago against content hash 067f46ace8a3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

ga4-report 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 11d 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.

commands/ga4-report.md · 52 lines

How it starts

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

/ga4-report - Custom Report Runner

Runs a custom GA4 report with user-specified metrics and dimensions.

Usage

/ga4-report <property_id> [--metrics sessions,activeUsers] [--dimensions date] [--days 30] [--limit 100]

Steps

  1. Language preference: Read ~/.config/data-arsenal/config.json. If language is set to anything other than English, write ALL commentary, explanations, and recommendations in that language. Data labels and GA4 metric names stay in English.

  2. Parse the request: If the user gives a natural language request instead of exact parameters, translate to GA4 metrics and dimensions:

    • "show me traffic by channel" -> --metrics sessions,activeUsers --dimensions sessionDefaultChannelGroup
    • "daily sessions this month" -> --metrics sessions --dimensions date --days 30
    • "top landing pages" -> --metrics sessions,bounceRate --dimensions landingPage
    • "revenue by source" -> --metrics totalRevenue,ecommercePurchases --dimensions sessionSourceMedium
  3. Run the report. Find the script in order:

    • ~/.config/data-arsenal/scripts/ga4-report (post-setup, primary)
    • scripts/ga4-report (CWD is the repo)
    • If neither exists, tell the user to run /ga4-setup first
if [ -x ~/.config/data-arsenal/scripts/ga4-report ]; then
  ~/.config/data-arsenal/scripts/ga4-report <property_id> --metrics <metrics> --dimensions <dims> --days <N> --limit <L>
elif [ -f scripts/ga4-report ]; then
  scripts/ga4-report <property_id> --metrics <metrics> --dimensions <dims> --days <N> --limit <L>
else
  echo "ERROR: Script not found. Run /ga4-setup first."
fi
  1. Present results with brief interpretation if the data warrants it.

Common Metrics

  • Traffic: sessions, activeUsers, newUsers, totalUsers
  • Engagement: engagementRate, bounceRate, averageSessionDuration, screenPageViews
  • Conversions: conversions, eventCount
  • E-commerce: totalRevenue, ecommercePurchases, purchaseRevenue

Common Dimensions

  • Time: date, hour, dayOfWeek
  • Source: sessionSourceMedium, sessionDefaultChannelGroup, sessionSource
  • Content: landingPage, pagePath, pageTitle
  • User: deviceCategory, country, city, userAgeBracket
  • Events: eventName

Read the full file on GitHub · 52 lines

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. 11d ago First seen · 52 lines · 11 tokens per session scan A 067f46ace8a3

Subscribe to this mod's changes

ga4-report is a command published in the GitHub repository ivanovzlatan2/data-arsenal-v1 (5 stars, last pushed 5mo ago), licensed MIT. It adds 11 tokens to every session and 590 once invoked, about $0.0001 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.