Data Arsenal v1 — AI-Powered GA4 Analyst
Open-source Claude Code plugin that turns Claude into a senior GA4 analyst. 6 what-changed reports, 20 health checks, 25 thinking patterns. Context engineering for analysis that actually explains WHY.
Your GA4 totals are lying to you. Revenue looks flat — but Product A is down 67%, Product B down 85%, and Product C up 88% compensating. Same story across devices, regions, campaigns. This is the KPI Surface Trap. Checking every breakdown every day is impossible manually. This tool does it for you.
The Problem
| Reality | Impact |
|---|
| ~65% of traffic is invisible | Consent mode (~55% loss), ad blockers (~33%), grey bots (~10%) — your absolute numbers are always wrong |
| Totals mask opposite trends | Flat sessions can hide channels diverging in opposite directions |
| Manual analysis doesn't scale | Checking 6 dimensions x 5 metrics x 7 days = hundreds of comparisons per client |
| Dashboards show numbers, not answers | They tell you WHAT changed, never WHY |
| AI is terrible at math | LLMs hallucinate statistics — they need tools to get real numbers |
Most analytics workflows sit at Level 2 (dashboards) or Level 3 (alerts). Data Arsenal is Level 4: Autonomous — an AI agent that investigates, reasons, and explains. No magic. Just system and strategy.
Quick Start
Requires Claude Code (Plan or Max). Paste this into Claude Code and it handles the rest:
git clone https://github.com/ivanovzlatan2/data-arsenal-v1.git && cd data-arsenal-v1 && claude plugin install . && echo "Plugin installed. Run /ga4-setup to connect your GA4 account."
Then inside Claude Code:
/ga4-setup
This installs dependencies, opens your browser for Google sign-in, and verifies access. Everything is handled automatically.
Note: Google will show an "unverified app" warning because the OAuth client is bundled with the open-source code (not published as a verified web app). Click Advanced → Go to Data Arsenal (unsafe) to proceed. The only permission requested is read-only access to Analytics — the app cannot modify your data. You can review the OAuth scope (analytics.readonly) and the full source code in this repo.
Once setup is complete:
/ga4-audit my-store # Health check by property name
/ga4-audit 123456789 # Or by property ID
/ga4-brief my-store # What-changed analysis (AI-powered insights)
You can use the property name (or part of it) instead of the numeric ID. Use list to see all properties:
~/.config/data-arsenal/scripts/ga4-audit list
Commands
| Command | What it does |
|---|
/ga4-setup | One-time setup: install deps, authenticate, verify access |
/ga4-audit <property> | 20 built-in health checks with health score |
/ga4-brief <property> | What-changed analysis with business context |
/ga4-context <client> | Create/update business context file (interactive) |
/ga4-report <property> | Custom GA4 report with any metrics/dimensions |
<property> can be a numeric ID (e.g., 123456789) or a name search (e.g., my-store).
Options
/ga4-brief my-store --days 14 # Compare last 14 days vs previous 14
/ga4-brief my-store --context my-store # Use business context file
/ga4-report my-store --metrics sessions,activeUsers --dimensions date --days 30
The 3-Layer Model (How It Works)
Most AI analytics tools do one thing: feed data to an LLM and hope for the best. Data Arsenal uses three distinct layers, each solving a different problem.
Layer 1: Tools & Data
Python scripts crunch real GA4 data via the Data API. Dual date ranges in a single API call. Changes scored by impact formula: absolute_change * min(percentage_change, 200%) / 100. This surfaces changes that are both large AND significant.
AI is terrible at math — it needs tools to get real numbers. Layer 1 provides the precise, calculated foundation. No hallucinated statistics.
Layer 2: Direction & Context
Raw numbers without business context lead to wrong conclusions. Layer 2 provides per-project context files: goals, funnel stages, competitors, seasonality, recent changes. Auto-enriched from the client's website via /ga4-context.
Without this, you optimize for the wrong thing. With it, the analysis knows that a traffic drop during your off-season is normal, or that a conversion spike coincides with a campaign launch.
Layer 3: Reasoning & Patterns
25 thinking patterns + hypothesis-driven investigation. When the data shows a drop, Layer 3 doesn't just report it — it checks if channels are diverging, if a device-specific bug appeared, if a landing page disappeared, if the product mix shifted.
The layer nobody provides. The biggest difference maker.
What You Get
What-Changed Reports (6 reports)