ga4-setup

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

A first-time setup command for connecting Google Analytics 4 to Data Arsenal, using either a cloud API key or Google's local sign-in process.

In plain words
What is it for?
Use it to connect an account, list its GA4 properties, and prepare for health checks or change-analysis reports.
Why use it?
It handles the connection steps needed before other GA4 commands can access analytics 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 connect an account, list its GA4 properties, and prepare for health checks or change-analysis reports.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/ivanovzlatan2/data-arsenal-v1/ga4-setup"><img src="https://agentmods.dev/badge/commands/ivanovzlatan2/data-arsenal-v1/ga4-setup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 548 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.00015 $0.00548
Opus 5 $0.00008 $0.00274
Sonnet 5 $0.00003 $0.00110
Haiku 4.5 $0.00002 $0.00055

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

Security

Grade A, and why

ga4-setup 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 10d 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-setup.md · 46 lines

What it actually says

/ga4-setup - First-Time Setup

Run the setup script to connect to Google Analytics. Two modes:

  • Easy (cloud): dataarsenal.com API key - 50 checks, no local OAuth
  • Advanced (local): Google OAuth - 20 checks, everything local

Steps

  1. Find and run the setup script. Check these locations in order:
    • First: scripts/ga4-setup (CWD is the repo - most common for first run)
    • Second: ~/.config/data-arsenal/scripts/ga4-setup (already set up, re-running)
    • Last resort: search for it
if [ -f scripts/ga4-setup ]; then
  python3 scripts/ga4-setup
elif [ -f ~/.config/data-arsenal/scripts/ga4-setup ]; then
  python3 ~/.config/data-arsenal/scripts/ga4-setup
else
  SCRIPT=$(find ~ -maxdepth 5 -path "*/data-arsenal*/scripts/ga4-setup" -type f 2>/dev/null | head -1)
  if [ -n "$SCRIPT" ]; then
    python3 "$SCRIPT"
  else
    echo "ERROR: Cannot find ga4-setup script."
    echo "Please cd into the data-arsenal-v1 directory and run: python3 scripts/ga4-setup"
  fi
fi
  1. If setup succeeds, show the user their properties and suggest next steps:

    • /ga4-audit <property_id> to run health checks
    • /ga4-brief <property_id> for what-changed analysis
    • /ga4-context <client> to create a business context file
  2. If setup fails, help diagnose:

    • Python version issues: need 3.8+
    • pip install failures: setup auto-creates a venv if needed. If it still fails, manually create: python3 -m venv ~/.config/data-arsenal/venv && ~/.config/data-arsenal/venv/bin/python3 scripts/ga4-setup
    • OAuth failures (local mode): check browser access, try again
    • API key failures (cloud mode): verify key at dataarsenal.com Settings page
    • No properties: verify Google account has GA4 access (local) or GA4 is connected at dataarsenal.com (cloud)
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. 10d ago First seen · 46 lines · 15 tokens per session scan A f17a07e40b8b

Subscribe to this mod's changes

ga4-setup is a command published in the GitHub repository ivanovzlatan2/data-arsenal-v1 (5 stars, last pushed 5mo ago), licensed MIT. It adds 15 tokens to every session and 548 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.